Skip to content
This repository has been archived by the owner on Jan 12, 2022. It is now read-only.

Commit

Permalink
ugly bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
zalun committed Nov 16, 2010
1 parent 4d6e7bb commit f2327da
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions apps/jetpack/views.py
Expand Up @@ -188,7 +188,7 @@ def package_disable(r, id_number):
"""
package = get_object_or_404(Package, id_number=id_number)
if r.user.pk != package.author.pk:
log_msg = ('User %s wanted to disable not his own Package %s.' % (
log_msg = 'User %s wanted to disable not his own Package %s.' % (
r.user, id_number)
log = commonware.log.getLogger('f.jetpack')
log.debug(log_msg)
Expand All @@ -212,7 +212,7 @@ def package_activate(r, id_number):
"""
package = get_object_or_404(Package, id_number=id_number)
if r.user.pk != package.author.pk:
log_msg = ('User %s wanted to activate not his own Package %s.' % (
log_msg = 'User %s wanted to activate not his own Package %s.' % (
r.user, id_number)
log = commonware.log.getLogger('f.jetpack')
log.debug(log_msg)
Expand All @@ -239,7 +239,7 @@ def package_add_module(r, id_number, type_id,
revision = get_package_revision(id_number, type_id, revision_number,
version_name)
if r.user.pk != revision.author.pk:
log_msg = ('User %s wanted to add a module to not his own Package %s.' % (
log_msg = 'User %s wanted to add a module to not his own Package %s.' % (
r.user, id_number)
log = commonware.log.getLogger('f.jetpack')
log.debug(log_msg)
Expand Down Expand Up @@ -276,7 +276,7 @@ def package_remove_module(r, id_number, type_id, revision_number):
"""
revision = get_package_revision(id_number, type_id, revision_number)
if r.user.pk != revision.author.pk:
log_msg = ('User %s wanted to remove a module from not his own Package %s.' % (
log_msg = 'User %s wanted to remove a module from not his own Package %s.' % (
r.user, id_number)
log = commonware.log.getLogger('f.jetpack')
log.debug(log_msg)
Expand All @@ -294,7 +294,7 @@ def package_remove_module(r, id_number, type_id, revision_number):
module_found = True

if not module_found:
log_msg = ('Attempt to delete a non existing module %s from %s.' % (
log_msg = 'Attempt to delete a non existing module %s from %s.' % (
filename, id_number)
log = commonware.log.getLogger('f.jetpack')
log.debug(log_msg)
Expand Down Expand Up @@ -343,7 +343,7 @@ def package_add_attachment(r, id_number, type_id,
revision = get_package_revision(id_number, type_id, revision_number,
version_name)
if r.user.pk != revision.author.pk:
log_msg = ('Unauthorised attempt to add attachment. user: %s, package: %s.' % (
log_msg = 'Unauthorised attempt to add attachment. user: %s, package: %s.' % (
r.user, id_number)
log = commonware.log.getLogger('f.jetpack')
log.debug(log_msg)
Expand All @@ -355,7 +355,7 @@ def package_add_attachment(r, id_number, type_id,
path = r.META.get('HTTP_X_FILE_NAME', False)

if not path:
log_msg = ('Path not found: %s, package: %s.' % (
log_msg = 'Path not found: %s, package: %s.' % (
path, id_number)
log = commonware.log.getLogger('f.jetpack')
log.debug(log_msg)
Expand Down Expand Up @@ -393,7 +393,7 @@ def package_remove_attachment(r, id_number, type_id, revision_number):
"""
revision = get_package_revision(id_number, type_id, revision_number)
if r.user.pk != revision.author.pk:
log_msg = ('Unauthorised attempt to remove attachment. user: %s, package: %s.' % (
log_msg = 'Unauthorised attempt to remove attachment. user: %s, package: %s.' % (
r.user, id_number)
log = commonware.log.getLogger('f.jetpack')
log.debug(log_msg)
Expand All @@ -411,7 +411,7 @@ def package_remove_attachment(r, id_number, type_id, revision_number):
attachment_found = True

if not attachment_found:
log_msg = ('Attempt to remove a non existingattachment. attachment: %s, package: %s.' % (
log_msg = 'Attempt to remove a non existingattachment. attachment: %s, package: %s.' % (
filename, id_number)
log = commonware.log.getLogger('f.jetpack')
log.debug(log_msg)
Expand Down Expand Up @@ -448,7 +448,7 @@ def package_save(r, id_number, type_id, revision_number=None,
revision = get_package_revision(id_number, type_id, revision_number,
version_name)
if r.user.pk != revision.author.pk:
log_msg = ('Unauthorised attempt to save package. user: %s, package: %s.' % (
log_msg = 'Unauthorised attempt to save package. user: %s, package: %s.' % (
r.user, id_number)
log = commonware.log.getLogger('f.jetpack')
log.debug(log_msg)
Expand Down Expand Up @@ -609,7 +609,7 @@ def package_assign_library(r, id_number, type_id,
revision = get_package_revision(id_number, type_id, revision_number,
version_name)
if r.user.pk != revision.author.pk:
log_msg = ('Unauthorised attempt to assign library. user: %s, package: %s.' % (
log_msg = 'Unauthorised attempt to assign library. user: %s, package: %s.' % (
r.user, id_number)
log = commonware.log.getLogger('f.jetpack')
log.debug(log_msg)
Expand Down Expand Up @@ -645,7 +645,7 @@ def package_remove_library(r, id_number, type_id, revision_number):
" remove dependency from the library provided via POST "
revision = get_package_revision(id_number, type_id, revision_number)
if r.user.pk != revision.author.pk:
log_msg = ('Unauthorised attempt to remove a library. user: %s, package: %s.' % (
log_msg = 'Unauthorised attempt to remove a library. user: %s, package: %s.' % (
r.user, id_number)
log = commonware.log.getLogger('f.jetpack')
log.debug(log_msg)
Expand Down

0 comments on commit f2327da

Please sign in to comment.