Brings some more files up to HACKING standards
Change-Id: I738fb70d49dade90d31e8c848fa841497083e9b4
This commit is contained in:
parent
599760a1f8
commit
4ea63c4021
@ -123,7 +123,7 @@ class LogReader(object):
|
||||
mkdir = False
|
||||
try:
|
||||
os.stat(d)
|
||||
except:
|
||||
except Exception:
|
||||
mkdir = True
|
||||
if mkdir:
|
||||
os.mkdir(d)
|
||||
@ -133,7 +133,7 @@ class LogReader(object):
|
||||
try:
|
||||
os.stat("%s/%s" % (processed_dir, rid))
|
||||
rv = True
|
||||
except:
|
||||
except Exception:
|
||||
pass
|
||||
return rv
|
||||
|
||||
|
@ -1391,7 +1391,7 @@ class VsaCommands(object):
|
||||
if storage is not None:
|
||||
try:
|
||||
storage_list = ast.literal_eval(storage)
|
||||
except:
|
||||
except Exception:
|
||||
print _("Invalid string format %s") % storage
|
||||
raise
|
||||
|
||||
@ -1580,7 +1580,7 @@ class VsaDriveTypeCommands(object):
|
||||
except exception.DBError, e:
|
||||
print "DB Error: %s" % e
|
||||
sys.exit(2)
|
||||
except:
|
||||
except Exception:
|
||||
sys.exit(3)
|
||||
else:
|
||||
print "%s %s" % (name, verb)
|
||||
@ -1740,7 +1740,7 @@ class InstanceTypeCommands(object):
|
||||
print "Currently defined instance_type names and flavorids:"
|
||||
self.list("--all")
|
||||
sys.exit(2)
|
||||
except:
|
||||
except Exception:
|
||||
print "Unknown error"
|
||||
sys.exit(3)
|
||||
else:
|
||||
@ -1765,7 +1765,7 @@ class InstanceTypeCommands(object):
|
||||
except exception.DBError, e:
|
||||
print "DB Error: %s" % e
|
||||
sys.exit(2)
|
||||
except:
|
||||
except Exception:
|
||||
sys.exit(3)
|
||||
else:
|
||||
print "%s %s" % (name, verb)
|
||||
|
@ -28,7 +28,7 @@ import urllib
|
||||
import urllib2
|
||||
try:
|
||||
import cPickle as pickle
|
||||
except:
|
||||
except Exception:
|
||||
import pickle
|
||||
|
||||
|
||||
@ -51,7 +51,7 @@ class SpoolSentry(object):
|
||||
self.send_data(data)
|
||||
destfile = "%s/processed/%s" % (self.spool_dir, fname)
|
||||
shutil.move(sourcefile, destfile)
|
||||
except:
|
||||
except Exception:
|
||||
logging.exception("Unable to upload record %s", fname)
|
||||
raise
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user