cc-4105: removed code duplication

This commit is contained in:
Rudi Grinberg 2012-08-14 15:21:46 -04:00
parent 1921ee6d59
commit 95d33b9248
3 changed files with 12 additions and 19 deletions

View file

@ -29,8 +29,9 @@ class CouldNotCreateIndexFile(Exception):
def __str__(self): return "Failed to create touch file '%s'" % self.path
class DirectoryIsNotListed(Exception):
def __init__(self,dir_id):
def __init__(self,dir_id,cause=None):
self.dir_id = dir_id
self.cause = cause
def __str__(self):
return "%d was not listed as a directory in the database" % self.dir_id