Skip to content

Commit

Permalink
Removed duplicate logs
Browse files Browse the repository at this point in the history
  • Loading branch information
palewire committed Apr 22, 2017
1 parent 7e5bc38 commit 5b1e7ae
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions bakery/management/commands/publish.py
Expand Up @@ -151,16 +151,6 @@ def handle(self, *args, **options):
if self.verbosity > 0:
self.stdout.write(msg)

if self.verbosity > 2:
for f in self.uploaded_file_list:
logger.info("Updated file: %s" % f)
if self.verbosity > 0:
self.stdout.write("Updated file: %s" % f)
for f in self.deleted_file_list:
logger.info("Deleted file: %s" % f)
if self.verbosity > 0:
self.stdout.write("Deleted file: %s" % f)

if self.dry_run:
logger.info("Publish executed with the --dry-run option. No content was changed on S3.")
if self.verbosity > 0:
Expand Down Expand Up @@ -350,8 +340,9 @@ def upload_to_s3(self, key, filename):

# access and write the contents from the file
if not self.dry_run:
logger.debug("Uploading %s" % filename)
if self.verbosity > 0:
logger.debug("uploading %s" % filename)
self.stdout.write("Uploading %s" % filename)
s3_obj = self.s3_resource.Object(self.aws_bucket_name, key)
s3_obj.upload_file(filename, ExtraArgs=extra_args)
self.uploaded_files += 1
Expand Down

0 comments on commit 5b1e7ae

Please sign in to comment.