Skip to content

Commit

Permalink
Avoid overriding 'bytes' type with the local variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
dannon committed Oct 14, 2015
1 parent 3e5b91c commit c05315c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/galaxy/jobs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1322,14 +1322,14 @@ def path_rewriter( path ):
tool=self.tool, stdout=job.stdout, stderr=job.stderr )
job.command_line = self.command_line

bytes = 0
collected_bytes = 0
# Once datasets are collected, set the total dataset size (includes extra files)
for dataset_assoc in job.output_datasets:
dataset_assoc.dataset.dataset.set_total_size()
bytes += dataset_assoc.dataset.dataset.get_total_size()
collected_bytes += dataset_assoc.dataset.dataset.get_total_size()

if job.user:
job.user.adjust_total_disk_usage( bytes )
job.user.adjust_total_disk_usage(collected_bytes)

# Empirically, we need to update job.user and
# job.workflow_invocation_step.workflow_invocation in separate
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/web/framework/webapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ def handle_user_login( self, user ):
if prev_galaxy_session.user is None:
# Increase the user's disk usage by the amount of the previous history's datasets if they didn't already own it.
for hda in history.datasets:
user.adjust_total_disk_usage(hda.quota_amount( user ))
user.adjust_total_disk_usage(hda.quota_amount(user))
elif self.galaxy_session.current_history:
history = self.galaxy_session.current_history
if (not history and users_last_session and
Expand Down

0 comments on commit c05315c

Please sign in to comment.