~ubuntu-branches/debian/squeeze/python-django/squeeze

« back to all changes in this revision

Viewing changes to django/contrib/auth/management/commands/createsuperuser.py

  • Committer: Bazaar Package Importer
  • Author(s): Chris Lamb, Chris Lamb, David Spreen, Sandro Tosi
  • Date: 2008-11-19 21:31:00 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20081119213100-gp0lqhxl1qxa6dgl
Tags: 1.0.2-1
[ Chris Lamb ]
* New upstream bugfix release. Closes: #505783
* Add myself to Uploaders with ACK from Brett.

[ David Spreen ]
* Remove python-pysqlite2 from Recommends because Python 2.5 includes
  sqlite library used by Django. Closes: 497886

[ Sandro Tosi ]
* debian/control
  - switch Vcs-Browser field to viewsvn

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
        # Try to determine the current system user's username to use as a default.
58
58
        try:
59
59
            import pwd
60
 
        except ImportError:
 
60
            default_username = pwd.getpwuid(os.getuid())[0].replace(' ', '').lower()
 
61
        except (ImportError, KeyError):
 
62
            # KeyError will be raised by getpwuid() if there is no
 
63
            # corresponding entry in the /etc/passwd file (a very restricted
 
64
            # chroot environment, for example).
61
65
            default_username = ''
62
 
        else:
63
 
            default_username = pwd.getpwuid(os.getuid())[0].replace(' ', '').lower()
64
66
 
65
67
        # Determine whether the default username is taken, so we don't display
66
68
        # it as an option.