Bug 1428834 - Incorrect error when imports fail: TypeError: cannot concatenate 'str' and 'list'
Summary: Incorrect error when imports fail: TypeError: cannot concatenate 'str' and 'l...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Satellite Synchronization
Version: 580
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomáš Kašpárek
QA Contact: Pavel Studeník
URL:
Whiteboard:
Depends On:
Blocks: sat580-low
TreeView+ depends on / blocked
 
Reported: 2017-03-03 13:10 UTC by Pavel Studeník
Modified: 2017-06-21 12:17 UTC (History)
2 users (show)

Fixed In Version: spacewalk-backend-2.5.3-76-sat
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-21 12:17:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Pavel Studeník 2017-03-03 13:10:02 UTC
Description of problem:
I try to sync custom channel and spacewalk-repo-sync doesn't work. It looks that problem is import debfile in rhnPackageUpload.

>> spacewalk-repo-sync -h
Traceback (most recent call last):
  File "/usr/bin/spacewalk-repo-sync", line 48, in <module>
    "Path not correct? " + sys.path)
TypeError: cannot concatenate 'str' and 'list' objects

> /usr/bin/spacewalk-repo-sync(44)<module>()
-> from spacewalk.satellite_tools import reposync
(Pdb) n
ImportError: 'No module named debfile'
> /usr/bin/spacewalk-repo-sync(44)<module>()

-> from spacewalk.server import rhnPackageUpload
(Pdb) n
ImportError: 'No module named debfile'


Version-Release number of selected component (if applicable):
spacewalk-backend-tools-2.5.3-73.el6sat.noarch

How reproducible:
always

Steps to Reproduce:
1. spacewalk-repo-sync -h

Comment 1 Pavel Studeník 2017-03-03 13:15:16 UTC
This is not valid code:

except ImportError:
    systemExit(1, "Unable to find code tree.\n"
               "Path not correct? " + sys.path)

# python
Python 2.6.6 (r266:84292, Aug  9 2016, 06:11:56) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> "string" + []
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: cannot concatenate 'str' and 'list' objects

Comment 2 Tomáš Kašpárek 2017-03-03 13:22:27 UTC
spacewalk.git(master): 0bda984c26a894af540708908b4da9a123293458

Comment 5 Pavel Studeník 2017-05-15 11:07:04 UTC
Verified in spacewalk-backend-tools-2.5.3-130.el6sat.noarch


Note You need to log in before you can comment on or make changes to this bug.