mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Python 3: use "as" instead of comma in except clause
This commit is contained in:
@@ -88,7 +88,7 @@ def __main__():
|
||||
page = urllib.urlopen( cur_URL )
|
||||
elif URL_method == 'post':
|
||||
page = urllib.urlopen( cur_URL, urllib.urlencode( params ) )
|
||||
except Exception, e:
|
||||
except Exception as e:
|
||||
stop_err( 'The remote data source application may be off line, please try again later. Error: %s' % str( e ) )
|
||||
if max_file_size:
|
||||
file_size = int( page.info().get( 'Content-Length', 0 ) )
|
||||
@@ -97,14 +97,14 @@ def __main__():
|
||||
# do sniff stream for multi_byte
|
||||
try:
|
||||
cur_filename, is_multi_byte = sniff.stream_to_open_named_file( page, os.open( cur_filename, os.O_WRONLY | os.O_CREAT ), cur_filename, source_encoding=get_charset_from_http_headers( page.headers ) )
|
||||
except Exception, e:
|
||||
except Exception as e:
|
||||
stop_err( 'Unable to fetch %s:\n%s' % ( cur_URL, e ) )
|
||||
|
||||
# here import checks that upload tool performs
|
||||
if enhanced_handling:
|
||||
try:
|
||||
ext = sniff.handle_uploaded_dataset_file( filename, datatypes_registry, ext=data_dict[ 'ext' ], is_multi_byte=is_multi_byte )
|
||||
except Exception, e:
|
||||
except Exception as e:
|
||||
stop_err( str( e ) )
|
||||
info = dict( type='dataset',
|
||||
dataset_id=data_dict[ 'dataset_id' ],
|
||||
|
||||
Reference in New Issue
Block a user