Skip to content

Commit

Permalink
WebSubmit: fix for Stamp_Uploaded_Files
Browse files Browse the repository at this point in the history
* BETTER Allows the stamping function to accept both files and
  directories.

Signed-off-by: Sebastian Witowski <[email protected]>
  • Loading branch information
Sebastian Witowski authored and switowski committed Sep 21, 2015
1 parent 2eb74cc commit dde5aee
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions modules/websubmit/lib/functions/Stamp_Uploaded_Files.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,8 @@ def visit_for_stamping(visit_for_stamping_arguments, dirname, filenames):
'file_stamper_options' members.
@param dirname: (string) - the path to the directory in which the
files are to be stamped.
@param filenames: (list) - the names of each file in dirname. An
attempt will be made to stamp each of these files.
@param filenames: (list) - the names of each file and subdirectory in
dirname. An attempt will be made to stamp each of the files.
@Exceptions Raised:
+ InvenioWebSubmitFunctionWarning;
+ InvenioWebSubmitFunctionError;
Expand Down Expand Up @@ -345,6 +345,10 @@ def visit_for_stamping(visit_for_stamping_arguments, dirname, filenames):
path_to_subject_file = "%s/%s" % (dirname, file_to_stamp)
file_stamper_options['input-file'] = path_to_subject_file

if not os.path.isfile(path_to_subject_file):
# If it's not a file, we can't stamp it. Continue with next file
continue

## Just before attempting to stamp the file, log the dictionary of
## options (file_stamper_options) that will be passed to websubmit-
## file-stamper:
Expand Down

0 comments on commit dde5aee

Please sign in to comment.