Bug 1175480

Summary: traceback if tilde is in debug file name
Product: [Fedora] Fedora Reporter: John Poelstra <poelstra>
Component: fedupAssignee: Will Woods <wwoods>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: tflink, wwoods
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: fedup-0.9.2-1.fc22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-04-23 16:05:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description John Poelstra 2014-12-17 19:58:53 UTC
Description of problem:

$  sudo fedup --network 21 --product=workstation --debuglog=~/fedup.log
Traceback (most recent call last):
  File "/bin/fedup", line 280, in <module>
    logutils.debuglog(args.debuglog)
  File "/usr/lib/python2.7/site-packages/fedup/logutils.py", line 49, in debuglog
    h = logging.FileHandler(filename)
  File "/usr/lib64/python2.7/logging/__init__.py", line 902, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib64/python2.7/logging/__init__.py", line 925, in _open
    stream = open(self.baseFilename, self.mode)
IOError: [Errno 2] No such file or directory: '/home/jp/~/fedup.log'


Version-Release number of selected component (if applicable):
fedup-0.9.1-1.fc20.noarch

How reproducible:
100%

Comment 1 Will Woods 2014-12-19 17:27:08 UTC
Should be fixed in git: https://github.com/wgwoods/fedup/commit/3223f78

Instead of a traceback, you'll get an error message like:

  Can't open debuglog '/home/jp/~/fedup.log': No such file or directory

Because what you actually want to do here is:

 $ sudo fedup --network 21 --product workstation --debuglog ~/fedup.log

Your shell is responsible for expanding '~', but it doesn't do that when it appears in the middle of a word.

Comment 2 Fedora Update System 2015-04-20 14:58:01 UTC
fedup-0.9.2-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/fedup-0.9.2-1.fc20

Comment 3 Fedora Update System 2015-04-20 14:58:07 UTC
fedup-0.9.2-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/fedup-0.9.2-1.fc21

Comment 4 Fedora Update System 2015-04-20 14:58:14 UTC
fedup-0.9.2-1.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/fedup-0.9.2-1.fc22

Comment 5 Fedora Update System 2015-04-20 15:06:23 UTC
fedup-0.9.2-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/fedup-0.9.2-1.fc21

Comment 6 Fedora Update System 2015-04-21 18:49:28 UTC
Package fedup-0.9.2-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing fedup-0.9.2-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-6467/fedup-0.9.2-1.fc20
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2015-04-23 16:05:38 UTC
fedup-0.9.2-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2015-04-23 16:11:32 UTC
fedup-0.9.2-1.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.