Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
cython
Commits
341dcb8a
Commit
341dcb8a
authored
Apr 14, 2009
by
Lisandro Dalcin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix error when Lexicon source file cannot be open (Cython inside a ZIP file)
parent
091ba984
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
Cython/Compiler/Scanning.py
Cython/Compiler/Scanning.py
+3
-1
No files found.
Cython/Compiler/Scanning.py
View file @
341dcb8a
...
@@ -48,6 +48,7 @@ def hash_source_file(path):
...
@@ -48,6 +48,7 @@ def hash_source_file(path):
from
hashlib
import
md5
as
new_md5
from
hashlib
import
md5
as
new_md5
except
ImportError
:
except
ImportError
:
from
md5
import
new
as
new_md5
from
md5
import
new
as
new_md5
f
=
None
try
:
try
:
try
:
try
:
f
=
open
(
path
,
"rU"
)
f
=
open
(
path
,
"rU"
)
...
@@ -56,6 +57,7 @@ def hash_source_file(path):
...
@@ -56,6 +57,7 @@ def hash_source_file(path):
print
(
"Unable to hash scanner source file (%s)"
%
e
)
print
(
"Unable to hash scanner source file (%s)"
%
e
)
return
""
return
""
finally
:
finally
:
if
f
:
f
.
close
()
f
.
close
()
# Normalise spaces/tabs. We don't know what sort of
# Normalise spaces/tabs. We don't know what sort of
# space-tab substitution the file may have been
# space-tab substitution the file may have been
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment