Bug 976002 - dnf: NameError 'os'
dnf: NameError 'os'
Status: CLOSED DUPLICATE of bug 974427
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-19 14:19 EDT by Zbigniew Jędrzejewski-Szmek
Modified: 2013-06-20 01:14 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-20 01:14:13 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Zbigniew Jędrzejewski-Szmek 2013-06-19 14:19:38 EDT
Description of problem:
Got my locale fucked up someway... and dnf throws a traceback:

$ locale
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=\'\'
LC_TIME=\'\'
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=\'\'
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=\'\'
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT=\'\'
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
$ sudo dnf update
Failed to set locale, defaulting to C
Traceback (most recent call last):
  File "/bin/dnf", line 35, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 304, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 39, in main
    _main(base, args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 44, in _main
    dnf.i18n.setup_locale()
  File "/usr/lib/python2.7/site-packages/dnf/i18n.py", line 53, in setup_locale
    os.environ['LC_ALL'] = 'C'
NameError: global name 'os' is not defined

Version-Release number of selected component (if applicable):
dnf-0.3.7-1.gitf8bdc98.fc19.noarch
Comment 1 Panu Matilainen 2013-06-20 01:14:13 EDT

*** This bug has been marked as a duplicate of bug 974427 ***

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