~radix/landscape-client/replaces-newer-landscape-client

« back to all changes in this revision

Viewing changes to landscape/configuration.py

  • Committer: Christopher Armstrong
  • Date: 2008-10-07 13:37:23 UTC
  • mto: (2.4.26 staging)
  • mto: This revision was merged to the branch mainline in revision 89.
  • Revision ID: radix@twistedmatrix.com-20081007133723-o9pizfi1b4zoyni6
Merge fix-non-root-crash [r=niemeyer,oubiwann] [f=268879]

This prevents the various client programs and landscape-config from blowing
up when run as the wrong user.

Show diffs side-by-side

added added

removed removed

Lines of Context:
423
423
 
424
424
 
425
425
def main(args):
 
426
    if os.getuid() != 0:
 
427
        sys.exit("landscape-config must be run as root.")
426
428
    config = LandscapeSetupConfiguration()
427
429
    config.load(args)
428
430