Skip to content
Browse files

Fix: get_list_from_remote() cannot get file under linux.

  • Loading branch information...
1 parent eb6e6f5 commit 766149bec3733fce5f224768362a3cf8756b73a3 @elleryq committed
Showing with 5 additions and 4 deletions.
  1. +5 −4 gcintsinlib/__init__.py
View
9 gcintsinlib/__init__.py
@@ -122,12 +122,13 @@ def get_list_from_remote( remote_filename ):
r = urlparse( url )
f = None
if r.scheme == 'file':
+ path = r.path
+ if r.path.startswith( '/' ):
+ path = r.path[1:]
if system_name == "Windows":
- filename = os.path.expanduser( r.path.replace( '\\', '/' ) )
- if filename.startswith( '/' ):
- filename = filename[1:]
+ filename = os.path.expanduser( path.replace( '\\', '/' ) )
else:
- filename = os.path.expanduser( r.path )
+ filename = os.path.expanduser( path )
if os.path.exists( filename ):
f = open( filename, "rb" )
else:

0 comments on commit 766149b

Please sign in to comment.
Something went wrong with that request. Please try again.