Added option to enable/disable staging file uploads, added better error reporting when creating staging files list

This commit is contained in:
Roberto Rosario
2011-02-06 20:01:55 -04:00
parent 0ee072f294
commit f38561099c
4 changed files with 76 additions and 49 deletions
+4 -1
View File
@@ -11,7 +11,10 @@ from documents.conf.settings import STAGING_DIRECTORY
def get_all_files():
return sorted([os.path.normcase(f) for f in os.listdir(STAGING_DIRECTORY) if os.path.isfile(os.path.join(STAGING_DIRECTORY, f))])
try:
return sorted([os.path.normcase(f) for f in os.listdir(STAGING_DIRECTORY) if os.path.isfile(os.path.join(STAGING_DIRECTORY, f))])
except OSError, exc:
raise OSError(ugettext(u'Unable get list of staging files: %s') % exc)
class StagingFile(object):