Skip to content

Commit

Permalink
Specifying error class
Browse files Browse the repository at this point in the history
  • Loading branch information
Keoma Brun committed Feb 11, 2016
1 parent 42ee0a8 commit 2819e94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def __init__(self):
try:
with open(DEFAULT_BACKUPFILE,'r') as f:
self.data = pickle.load(f)
except (EnvironmentError, PickleError):
except (EnvironmentError, pickle.PickleError):
self.data = {
'stats' : {},
'config' : {
Expand Down Expand Up @@ -292,7 +292,7 @@ def _exec_cmd(self,cmd):
returnVal = None
try:
returnVal = subprocess.check_output(cmd, shell=False)
except CalledProcessError:
except subprocess.CalledProcessError:
returnVal = "ERROR"
return returnVal

Expand Down

0 comments on commit 2819e94

Please sign in to comment.