def UuidDb(): """Simple singleton wrapper with lazy initialization""" global _uuid_db_instance if _uuid_db_instance == None: import config from smolt import get_config_attr _uuid_db_instance = _UuidDb(get_config_attr("UUID_DB", os.path.expanduser('~/.smolt/uuiddb.cfg'))) return _uuid_db_instance
def UuidDb(): """Simple singleton wrapper with lazy initialization""" global _uuid_db_instance if _uuid_db_instance == None: import config from smolt import get_config_attr _uuid_db_instance = _UuidDb( get_config_attr("UUID_DB", os.path.expanduser('~/.smolt/uuiddb.cfg'))) return _uuid_db_instance
print _('Could not send - Exiting') sys.exit(1) if opts.userName: if not opts.password: password = getpass.getpass('\n' + _('Password:'******' ') else: password = opts.password if profile.register(userName=opts.userName, password=password, user_agent=opts.user_agent, smoonURL=opts.smoonURL, timeout=opts.timeout): print _('Registration Failed, Try again') if not opts.submitOnly and not opts.checkin: scan(profile, opts.smoonURL) try: rating(profile, opts.smoonURL) except ValueError: print "Could not get rating!" print if pub_uuid: pubUrl = smolt.get_profile_link(opts.smoonURL, pub_uuid) print _('To share your profile: \n\t%s (public)') % pubUrl hw_uuid_file = get_config_attr("HW_PUBID", "/etc/smolt/hw-uuid.pub") hw_uuid_pub = os.path.basename(pubUrl) if not smolt.secure: print _('\tAdmin Password: %s') % admin else: print _('No Public UUID found! Please re-run with -n to generate a new public uuid')
password = getpass.getpass('\n' + _('Password:'******' ') else: password = opts.password if profile.register(userName=opts.userName, password=password, user_agent=opts.user_agent, smoonURL=opts.smoonURL, timeout=opts.timeout): print _('Registration Failed, Try again') if not opts.submitOnly and not opts.checkin: scan(profile, opts.smoonURL) try: rating(profile, opts.smoonURL) except ValueError: print "Could not get rating!" print if pub_uuid: pubUrl = smolt.get_profile_link(opts.smoonURL, pub_uuid) print _('To share your profile: \n\t%s (public)') % pubUrl hw_uuid_file = get_config_attr("HW_PUBID", "/etc/smolt/hw-uuid.pub") hw_uuid_pub = os.path.basename(pubUrl) if not smolt.secure: print _('\tAdmin Password: %s') % admin elif not opts.checkin: print _( 'No Public UUID found! Please re-run with -n to generate a new public uuid' )