Project

Profile

Help

Issue #2722

Local variable 'published_after_predistributor' referenced before assignment"

Added by ipanova@redhat.com almost 5 years ago. Updated about 1 year ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
2.13.1
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Sprint 19
Quarter:

Description

1. create repo with yum and rsync dist
2. publish with rsync --> observe skipped publish result
3. publish with rsync again and observe the traceback

Operations:       publish
Resources:        test-repo380 (repository)
State:            Failed
Start Time:       2017-04-19T12:12:41Z
Finish Time:      2017-04-19T12:12:41Z
Result:           N/A
Task Id:          497cf91a-350c-4fd8-83b9-72b386dd3aff
Progress Report:  
Traceback:        Traceback (most recent call last):   File
                  "/usr/lib/python2.7/site-packages/celery/app/trace.py", line
                  240, in trace_task     R = retval = fun(*args, **kwargs)  
                  File
                  "/home/ipanova/pulp_development/pulp/server/pulp/server/async/
                  tasks.py", line 506, in __call__     return super(Task,
                  self).__call__(*args, **kwargs)   File
                  "/home/ipanova/pulp_development/pulp/server/pulp/server/async/
                  tasks.py", line 107, in __call__     return super(PulpTask,
                  self).__call__(*args, **kwargs)   File
                  "/usr/lib/python2.7/site-packages/celery/app/trace.py", line
                  437, in __protected_call__     return self.run(*args,
                  **kwargs)   File
                  "/home/ipanova/pulp_development/pulp/server/pulp/server/contro
                  llers/repository.py", line 1106, in publish     result =
                  check_publish(repo_obj, dist_id, dist_inst, transfer_repo,
                  conduit, call_config)   File
                  "/home/ipanova/pulp_development/pulp/server/pulp/server/contro
                  llers/repository.py", line 1164, in check_publish    
                  skip_for_predistributor = (predistributor_id and
                  (published_after_predistributor or UnboundLocalError: local
                  variable 'published_after_predistributor' referenced before
                  assignment 

Associated revisions

Revision 417b88e3 View on GitHub
Added by dalley almost 5 years ago

Fix 'referenced before assignment' errors

Fix several cases where variables defined behind conditionals are referenced elsewhere in the code from an upper scope.

closes #2722 https://pulp.plan.io/issues/2722

History

#1 Updated by ttereshc almost 5 years ago

  • Sprint/Milestone set to 37
  • Triaged changed from No to Yes

#2 Updated by dalley almost 5 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to dalley

#3 Updated by dalley almost 5 years ago

  • Status changed from ASSIGNED to POST

#4 Updated by jortel@redhat.com over 4 years ago

  • Sprint/Milestone changed from 37 to 38

#5 Updated by dalley over 4 years ago

  • Status changed from POST to MODIFIED

#7 Updated by bizhang over 4 years ago

  • Platform Release set to 2.13.1

#8 Updated by bizhang over 4 years ago

  • Status changed from MODIFIED to 5

#10 Updated by bizhang over 4 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE

#11 Updated by bmbouter almost 4 years ago

  • Sprint set to Sprint 19

#12 Updated by bmbouter almost 4 years ago

  • Sprint/Milestone deleted (38)

#13 Updated by bmbouter almost 3 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF