Skip to content

Commit

Permalink
Fix python 2 exception handling
Browse files Browse the repository at this point in the history
Incorporated changes from FoldingAtHome#55
  • Loading branch information
nikolaik committed Mar 22, 2020
1 parent b2cb272 commit d57193c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import os
env = Environment(ENV = os.environ)
try:
env.Tool('config', toolpath = [os.environ.get('CBANG_HOME')])
except Exception, e:
raise Exception, 'CBANG_HOME not set?\n' + str(e)
except Exception as e:
raise Exception('CBANG_HOME not set?\n' + str(e))

env.CBLoadTools('packager run_distutils osx fah-client-version')
env.CBAddVariables(
Expand All @@ -14,7 +14,7 @@ conf = env.CBConfigure()
# Version
try:
version = env.FAHClientVersion()
except Exception, e:
except Exception as e:
print(e)
version = '0.0.0'
env.Replace(PACKAGE_VERSION = version)
Expand Down
4 changes: 2 additions & 2 deletions fah/FAHControl.py
Original file line number Diff line number Diff line change
Expand Up @@ -1062,9 +1062,9 @@ def save_client_config(self, client):

return True

except Exception as msg:
except Exception as err:
self.set_status('Save Failed')
self.error(msg)
self.error(err)
return False


Expand Down

0 comments on commit d57193c

Please sign in to comment.