bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def warning2(mesg, once=False, listener=None): """ Display a styles.stylized warning message on stderr, only if verbose level > INFO. """ if once: try: already_displayed = __warningsdb[mesg] return except KeyError, e: __warningsdb[mesg] = True if listener and listener.verbose >= verbose.INFO: listener.process( LicornMessage(data="%s%s %s\n" % ( styles.stylize(styles.ST_WARNING, '/2\\'), mytime(), mesg)), options.msgproc.getProxy()) if options.verbose >= verbose.INFO: sys.stderr.write("%s%s %s\n" % ( styles.stylize(styles.ST_WARNING, '/2\\'), mytime(), mesg))
def warning2(mesg, once=False, listener=None): """ Display a stylized warning message on stderr, only if verbose level > INFO. """ if once: try: already_displayed = __warningsdb[mesg] return except KeyError, e: __warningsdb[mesg] = True if listener and listener.verbose >= verbose.INFO: listener.process( LicornMessage(data="%s%s %s\n" % ( styles.stylize(styles.ST_WARNING, '/2\\'), mytime(), mesg)), options.msgproc.getProxy()) if options.verbose >= verbose.INFO: sys.stderr.write("%s%s %s\n" % ( styles.stylize(styles.ST_WARNING, '/2\\'), mytime(), mesg))
478,400
def warning2(mesg, once=False, listener=None): """ Display a styles.stylized warning message on stderr, only if verbose level > INFO. """ if once: try: already_displayed = __warningsdb[mesg] return except KeyError, e: __warningsdb[mesg] = True if listener and listener.verbose >= verbose.INFO: listener.process( LicornMessage(data="%s%s %s\n" % ( styles.stylize(styles.ST_WARNING, '/2\\'), mytime(), mesg)), options.msgproc.getProxy()) if options.verbose >= verbose.INFO: sys.stderr.write("%s%s %s\n" % ( styles.stylize(styles.ST_WARNING, '/2\\'), mytime(), mesg))
def warning2(mesg, once=False, listener=None): """ Display a styles.stylized warning message on stderr, only if verbose level > INFO. """ if once: try: already_displayed = __warningsdb[mesg] return except KeyError, e: __warningsdb[mesg] = True if listener and listener.verbose >= verbose.INFO: listener.process( LicornMessage(data="%s%s %s\n" % ( stylize(ST_WARNING, '/2\\'), mytime(), mesg)), options.msgproc.getProxy()) if options.verbose >= verbose.INFO: sys.stderr.write("%s%s %s\n" % ( styles.stylize(styles.ST_WARNING, '/2\\'), mytime(), mesg))
478,401
def warning2(mesg, once=False, listener=None): """ Display a styles.stylized warning message on stderr, only if verbose level > INFO. """ if once: try: already_displayed = __warningsdb[mesg] return except KeyError, e: __warningsdb[mesg] = True if listener and listener.verbose >= verbose.INFO: listener.process( LicornMessage(data="%s%s %s\n" % ( styles.stylize(styles.ST_WARNING, '/2\\'), mytime(), mesg)), options.msgproc.getProxy()) if options.verbose >= verbose.INFO: sys.stderr.write("%s%s %s\n" % ( styles.stylize(styles.ST_WARNING, '/2\\'), mytime(), mesg))
def warning2(mesg, once=False, listener=None): """ Display a styles.stylized warning message on stderr, only if verbose level > INFO. """ if once: try: already_displayed = __warningsdb[mesg] return except KeyError, e: __warningsdb[mesg] = True if listener and listener.verbose >= verbose.INFO: listener.process( LicornMessage(data="%s%s %s\n" % ( styles.stylize(styles.ST_WARNING, '/2\\'), mytime(), mesg)), options.msgproc.getProxy()) if options.verbose >= verbose.INFO: sys.stderr.write("%s%s %s\n" % ( styles.stylize(styles.ST_WARNING, '/2\\'), mytime(), mesg))
478,402
def notice(mesg, listener=None): """ Display a non-styles.stylized notice message on stderr.""" assert ltrace('logging', '| notice(%s L%s/R%s)' % (verbose.NOTICE, options.verbose, listener.verbose if listener else '-')) if listener and listener.verbose >= verbose.NOTICE: listener.process(LicornMessage(data=" %s %s %s\n" % ( styles.stylize(styles.ST_INFO, '*'), mytime(), mesg)), options.msgproc.getProxy()) if options.verbose >= verbose.NOTICE: sys.stderr.write(" %s %s %s\n" % ( styles.stylize(styles.ST_INFO, '*'), mytime(), mesg))
def notice(mesg, listener=None): """ Display a non-stylized notice message on stderr.""" assert ltrace('logging', '| notice(%s L%s/R%s)' % (verbose.NOTICE, options.verbose, listener.verbose if listener else '-')) if listener and listener.verbose >= verbose.NOTICE: listener.process(LicornMessage(data=" %s %s %s\n" % ( styles.stylize(styles.ST_INFO, '*'), mytime(), mesg)), options.msgproc.getProxy()) if options.verbose >= verbose.NOTICE: sys.stderr.write(" %s %s %s\n" % ( styles.stylize(styles.ST_INFO, '*'), mytime(), mesg))
478,403
def notice(mesg, listener=None): """ Display a non-styles.stylized notice message on stderr.""" assert ltrace('logging', '| notice(%s L%s/R%s)' % (verbose.NOTICE, options.verbose, listener.verbose if listener else '-')) if listener and listener.verbose >= verbose.NOTICE: listener.process(LicornMessage(data=" %s %s %s\n" % ( styles.stylize(styles.ST_INFO, '*'), mytime(), mesg)), options.msgproc.getProxy()) if options.verbose >= verbose.NOTICE: sys.stderr.write(" %s %s %s\n" % ( styles.stylize(styles.ST_INFO, '*'), mytime(), mesg))
def notice(mesg, listener=None): """ Display a non-styles.stylized notice message on stderr.""" assert ltrace('logging', '| notice(%s L%s/R%s)' % (verbose.NOTICE, options.verbose, listener.verbose if listener else '-')) if listener and listener.verbose >= verbose.NOTICE: listener.process(LicornMessage(data=" %s %s %s\n" % ( stylize(ST_INFO, '*'), mytime(), mesg)), options.msgproc.getProxy()) if options.verbose >= verbose.NOTICE: sys.stderr.write(" %s %s %s\n" % ( styles.stylize(styles.ST_INFO, '*'), mytime(), mesg))
478,404
def notice(mesg, listener=None): """ Display a non-styles.stylized notice message on stderr.""" assert ltrace('logging', '| notice(%s L%s/R%s)' % (verbose.NOTICE, options.verbose, listener.verbose if listener else '-')) if listener and listener.verbose >= verbose.NOTICE: listener.process(LicornMessage(data=" %s %s %s\n" % ( styles.stylize(styles.ST_INFO, '*'), mytime(), mesg)), options.msgproc.getProxy()) if options.verbose >= verbose.NOTICE: sys.stderr.write(" %s %s %s\n" % ( styles.stylize(styles.ST_INFO, '*'), mytime(), mesg))
def notice(mesg, listener=None): """ Display a non-styles.stylized notice message on stderr.""" assert ltrace('logging', '| notice(%s L%s/R%s)' % (verbose.NOTICE, options.verbose, listener.verbose if listener else '-')) if listener and listener.verbose >= verbose.NOTICE: listener.process(LicornMessage(data=" %s %s %s\n" % ( styles.stylize(styles.ST_INFO, '*'), mytime(), mesg)), options.msgproc.getProxy()) if options.verbose >= verbose.NOTICE: sys.stderr.write(" %s %s %s\n" % ( styles.stylize(styles.ST_INFO, '*'), mytime(), mesg))
478,405
def info(mesg, listener=None): """ Display a styles.stylized information message on stderr.""" assert ltrace('logging', '| info(%s L%s/R%s)' % (verbose.INFO, options.verbose, listener.verbose if listener else '-')) if listener and listener.verbose >= verbose.INFO: listener.process( LicornMessage(data=" * %s %s\n" % (mytime(), mesg)), options.msgproc.getProxy()) if options.verbose >= verbose.INFO: sys.stderr.write(" * %s %s\n" % (mytime(), mesg))
def info(mesg, listener=None): """ Display a stylized information message on stderr.""" assert ltrace('logging', '| info(%s L%s/R%s)' % (verbose.INFO, options.verbose, listener.verbose if listener else '-')) if listener and listener.verbose >= verbose.INFO: listener.process( LicornMessage(data=" * %s %s\n" % (mytime(), mesg)), options.msgproc.getProxy()) if options.verbose >= verbose.INFO: sys.stderr.write(" * %s %s\n" % (mytime(), mesg))
478,406
def progress(mesg, listener=None): """ Display a styles.stylized progress message on stderr. """ assert ltrace('logging', '| progress(%s L%s/R%s)' % (verbose.PROGRESS, options.verbose, listener.verbose if listener else '-')) if listener and listener.verbose >= verbose.PROGRESS: listener.process( LicornMessage(data=" > %s %s\n" % (mytime(), mesg)), options.msgproc.getProxy()) if options.verbose >= verbose.PROGRESS: sys.stderr.write(" > %s %s\n" % (mytime(), mesg))
def progress(mesg, listener=None): """ Display a stylized progress message on stderr. """ assert ltrace('logging', '| progress(%s L%s/R%s)' % (verbose.PROGRESS, options.verbose, listener.verbose if listener else '-')) if listener and listener.verbose >= verbose.PROGRESS: listener.process( LicornMessage(data=" > %s %s\n" % (mytime(), mesg)), options.msgproc.getProxy()) if options.verbose >= verbose.PROGRESS: sys.stderr.write(" > %s %s\n" % (mytime(), mesg))
478,407
def debug(mesg): """Display a styles.stylized debug message on stderr.""" if options.verbose >= verbose.DEBUG: sys.stderr.write( "%s: %s\n" % ( styles.stylize(styles.ST_DEBUG, 'DEBUG'), mesg) )
def debug(mesg): """Display a stylized debug message on stderr.""" if options.verbose >= verbose.DEBUG: sys.stderr.write( "%s: %s\n" % ( styles.stylize(styles.ST_DEBUG, 'DEBUG'), mesg) )
478,408
def debug(mesg): """Display a styles.stylized debug message on stderr.""" if options.verbose >= verbose.DEBUG: sys.stderr.write( "%s: %s\n" % ( styles.stylize(styles.ST_DEBUG, 'DEBUG'), mesg) )
def debug(mesg): """Display a styles.stylized debug message on stderr.""" if options.verbose >= verbose.DEBUG: sys.stderr.write( "%s: %s\n" % ( styles.stylize(styles.ST_DEBUG, 'DEBUG'), mesg) )
478,409
def debug2(mesg): """Display a styles.stylized debug2 message on stderr.""" if options.verbose >= verbose.DEBUG2: sys.stderr.write("%s: %s\n" % ( styles.stylize(styles.ST_DEBUG, 'DEBUG2'), mesg))
def debug2(mesg): """Display a stylized debug2 message on stderr.""" if options.verbose >= verbose.DEBUG2: sys.stderr.write("%s: %s\n" % ( styles.stylize(styles.ST_DEBUG, 'DEBUG2'), mesg))
478,410
def debug2(mesg): """Display a styles.stylized debug2 message on stderr.""" if options.verbose >= verbose.DEBUG2: sys.stderr.write("%s: %s\n" % ( styles.stylize(styles.ST_DEBUG, 'DEBUG2'), mesg))
def debug2(mesg): """Display a styles.stylized debug2 message on stderr.""" if options.verbose >= verbose.DEBUG2: sys.stderr.write("%s: %s\n" % ( styles.stylize(styles.ST_DEBUG, 'DEBUG2'), mesg))
478,411
def is_system_login(login): """ return true if login is system. """ try: return UsersController.is_system_uid( UsersController.login_cache[login]) except KeyError: raise exceptions.DoesntExistsException( logging.SYSU_USER_DOESNT_EXIST % login)
def@staticmethod def is_standard_login(login): """ Return true if login is standard (not system). """ try: return UsersController.is_standard_uid( UsersController.login_cache[login]) except KeyError: raise exceptions.DoesntExistsException( logging.SYSU_USER_DOESNT_EXIST % login) is_system_login(login):@staticmethod def is_standard_login(login): """ Return true if login is standard (not system). """ try: return UsersController.is_standard_uid( UsersController.login_cache[login]) except KeyError: raise exceptions.DoesntExistsException( logging.SYSU_USER_DOESNT_EXIST % login) """@staticmethod def is_standard_login(login): """ Return true if login is standard (not system). """ try: return UsersController.is_standard_uid( UsersController.login_cache[login]) except KeyError: raise exceptions.DoesntExistsException( logging.SYSU_USER_DOESNT_EXIST % login) return@staticmethod def is_standard_login(login): """ Return true if login is standard (not system). """ try: return UsersController.is_standard_uid( UsersController.login_cache[login]) except KeyError: raise exceptions.DoesntExistsException( logging.SYSU_USER_DOESNT_EXIST % login) true@staticmethod def is_standard_login(login): """ Return true if login is standard (not system). """ try: return UsersController.is_standard_uid( UsersController.login_cache[login]) except KeyError: raise exceptions.DoesntExistsException( logging.SYSU_USER_DOESNT_EXIST % login) if@staticmethod def is_standard_login(login): """ Return true if login is standard (not system). """ try: return UsersController.is_standard_uid( UsersController.login_cache[login]) except KeyError: raise exceptions.DoesntExistsException( logging.SYSU_USER_DOESNT_EXIST % login) login@staticmethod def is_standard_login(login): """ Return true if login is standard (not system). """ try: return UsersController.is_standard_uid( UsersController.login_cache[login]) except KeyError: raise exceptions.DoesntExistsException( logging.SYSU_USER_DOESNT_EXIST % login) is@staticmethod def is_standard_login(login): """ Return true if login is standard (not system). """ try: return UsersController.is_standard_uid( UsersController.login_cache[login]) except KeyError: raise exceptions.DoesntExistsException( logging.SYSU_USER_DOESNT_EXIST % login) system.@staticmethod def is_standard_login(login): """ Return true if login is standard (not system). """ try: return UsersController.is_standard_uid( UsersController.login_cache[login]) except KeyError: raise exceptions.DoesntExistsException( logging.SYSU_USER_DOESNT_EXIST % login) """@staticmethod def is_standard_login(login): """ Return true if login is standard (not system). """ try: return UsersController.is_standard_uid( UsersController.login_cache[login]) except KeyError: raise exceptions.DoesntExistsException( logging.SYSU_USER_DOESNT_EXIST % login) try:@staticmethod def is_standard_login(login): """ Return true if login is standard (not system). """ try: return UsersController.is_standard_uid( UsersController.login_cache[login]) except KeyError: raise exceptions.DoesntExistsException( logging.SYSU_USER_DOESNT_EXIST % login) return@staticmethod def is_standard_login(login): """ Return true if login is standard (not system). """ try: return UsersController.is_standard_uid( UsersController.login_cache[login]) except KeyError: raise exceptions.DoesntExistsException( logging.SYSU_USER_DOESNT_EXIST % login) UsersController.is_system_uid(@staticmethod def is_standard_login(login): """ Return true if login is standard (not system). """ try: return UsersController.is_standard_uid( UsersController.login_cache[login]) except KeyError: raise exceptions.DoesntExistsException( logging.SYSU_USER_DOESNT_EXIST % login) UsersController.login_cache[login])@staticmethod def is_standard_login(login): """ Return true if login is standard (not system). """ try: return UsersController.is_standard_uid( UsersController.login_cache[login]) except KeyError: raise exceptions.DoesntExistsException( logging.SYSU_USER_DOESNT_EXIST % login) except@staticmethod def is_standard_login(login): """ Return true if login is standard (not system). """ try: return UsersController.is_standard_uid( UsersController.login_cache[login]) except KeyError: raise exceptions.DoesntExistsException( logging.SYSU_USER_DOESNT_EXIST % login) KeyError:@staticmethod def is_standard_login(login): """ Return true if login is standard (not system). """ try: return UsersController.is_standard_uid( UsersController.login_cache[login]) except KeyError: raise exceptions.DoesntExistsException( logging.SYSU_USER_DOESNT_EXIST % login) raise@staticmethod def is_standard_login(login): """ Return true if login is standard (not system). """ try: return UsersController.is_standard_uid( UsersController.login_cache[login]) except KeyError: raise exceptions.DoesntExistsException( logging.SYSU_USER_DOESNT_EXIST % login) exceptions.DoesntExistsException(@staticmethod def is_standard_login(login): """ Return true if login is standard (not system). """ try: return UsersController.is_standard_uid( UsersController.login_cache[login]) except KeyError: raise exceptions.DoesntExistsException( logging.SYSU_USER_DOESNT_EXIST % login) logging.SYSU_USER_DOESNT_EXIST@staticmethod def is_standard_login(login): """ Return true if login is standard (not system). """ try: return UsersController.is_standard_uid( UsersController.login_cache[login]) except KeyError: raise exceptions.DoesntExistsException( logging.SYSU_USER_DOESNT_EXIST % login) %@staticmethod def is_standard_login(login): """ Return true if login is standard (not system). """ try: return UsersController.is_standard_uid( UsersController.login_cache[login]) except KeyError: raise exceptions.DoesntExistsException( logging.SYSU_USER_DOESNT_EXIST % login) login)
478,412
def DeleteGroup(self, name, del_users, no_archive, bygid=None, batch=False): """ Delete an Licorn group """ if name is None and bygid is None: raise exceptions.BadArgumentError( "You must specify a name or a GID.")
defDeleteGroup(self,name,del_users,no_archive,bygid=None,batch=False):"""DeleteanLicorngroup"""ifnameisNoneandbygidisNone:raiseexceptions.BadArgumentError("YoumustspecifyanameoraGID.")
478,413
def minifind(path, type = None, perms = None, mindepth = 0, maxdepth = 99, exclude = [], followlinks = False, followmounts = False): """mimic the GNU find behaviour in python. returns an iterator. WARNING: recursive function !""" if mindepth > maxdepth: raise exceptions.BadArgumentError("mindepth must be <= maxdepth.") if maxdepth > 99: raise exceptions.BadArgumentError("please don't try to exhaust maxdepth.") logging.debug("starting minifind in %s, type=%s, mindepth=%s, maxdepth=%s, exclude=%s." \ % (path, type, mindepth, maxdepth, exclude)) paths_to_walk = [ path ] next_paths_to_walk = [] current_depth = 0 S_IFSTD = S_IFDIR | S_IFREG while True: if paths_to_walk != []: entry = paths_to_walk.pop(0) elif next_paths_to_walk != []: paths_to_walk = next_paths_to_walk next_paths_to_walk = [] entry = paths_to_walk.pop(0) current_depth += 1 else: break try: entry_stat = os.lstat(entry) entry_type = entry_stat.st_mode & 0170000 entry_mode = entry_stat.st_mode & 07777 if current_depth >= mindepth \ and ( (type is None and entry_type & S_IFSTD) or entry_type == type) \ and ( perms is None or (entry_mode & perms) ): yield entry if (entry_type & S_IFLNK and not followlinks) \ or (os.path.ismount(entry) and not followmounts): continue if entry_type & S_IFDIR and current_depth < maxdepth: for x in os.listdir(entry): if x not in exclude: next_paths_to_walk.append("%s/%s" % (entry, x)) except OSError, e: if e.errno == 2 or (e.errno == 13 and entry[-5:] == '.gvfs'): continue raise e
def minifind(path, type=None, perms=None, mindepth=0, maxdepth=99, exclude=[], followlinks=False, followmounts=True): """ Mimic the GNU find behaviour in python. returns an iterator. """ if mindepth > maxdepth: raise exceptions.BadArgumentError("mindepth must be <= maxdepth.") if maxdepth > 99: raise exceptions.BadArgumentError("please don't try to exhaust maxdepth.") logging.debug("starting minifind in %s, type=%s, mindepth=%s, maxdepth=%s, exclude=%s." \ % (path, type, mindepth, maxdepth, exclude)) paths_to_walk = [ path ] next_paths_to_walk = [] current_depth = 0 S_IFSTD = S_IFDIR | S_IFREG while True: if paths_to_walk != []: entry = paths_to_walk.pop(0) elif next_paths_to_walk != []: paths_to_walk = next_paths_to_walk next_paths_to_walk = [] entry = paths_to_walk.pop(0) current_depth += 1 else: break try: entry_stat = os.lstat(entry) entry_type = entry_stat.st_mode & 0170000 entry_mode = entry_stat.st_mode & 07777 if current_depth >= mindepth \ and ( (type is None and entry_type & S_IFSTD) or entry_type == type) \ and ( perms is None or (entry_mode & perms) ): yield entry if (entry_type & S_IFLNK and not followlinks) \ or (os.path.ismount(entry) and not followmounts): continue if entry_type & S_IFDIR and current_depth < maxdepth: for x in os.listdir(entry): if x not in exclude: next_paths_to_walk.append("%s/%s" % (entry, x)) except OSError, e: if e.errno == 2 or (e.errno == 13 and entry[-5:] == '.gvfs'): continue raise e
478,414
def minifind(path, type = None, perms = None, mindepth = 0, maxdepth = 99, exclude = [], followlinks = False, followmounts = False): """mimic the GNU find behaviour in python. returns an iterator. WARNING: recursive function !""" if mindepth > maxdepth: raise exceptions.BadArgumentError("mindepth must be <= maxdepth.") if maxdepth > 99: raise exceptions.BadArgumentError("please don't try to exhaust maxdepth.") logging.debug("starting minifind in %s, type=%s, mindepth=%s, maxdepth=%s, exclude=%s." \ % (path, type, mindepth, maxdepth, exclude)) paths_to_walk = [ path ] next_paths_to_walk = [] current_depth = 0 S_IFSTD = S_IFDIR | S_IFREG while True: if paths_to_walk != []: entry = paths_to_walk.pop(0) elif next_paths_to_walk != []: paths_to_walk = next_paths_to_walk next_paths_to_walk = [] entry = paths_to_walk.pop(0) current_depth += 1 else: break try: entry_stat = os.lstat(entry) entry_type = entry_stat.st_mode & 0170000 entry_mode = entry_stat.st_mode & 07777 if current_depth >= mindepth \ and ( (type is None and entry_type & S_IFSTD) or entry_type == type) \ and ( perms is None or (entry_mode & perms) ): yield entry if (entry_type & S_IFLNK and not followlinks) \ or (os.path.ismount(entry) and not followmounts): continue if entry_type & S_IFDIR and current_depth < maxdepth: for x in os.listdir(entry): if x not in exclude: next_paths_to_walk.append("%s/%s" % (entry, x)) except OSError, e: if e.errno == 2 or (e.errno == 13 and entry[-5:] == '.gvfs'): continue raise e
def minifind(path, type = None, perms = None, mindepth = 0, maxdepth = 99, exclude = [], followlinks = False, followmounts = False): """mimic the GNU find behaviour in python. returns an iterator. WARNING: recursive function !""" if mindepth > maxdepth: raise exceptions.BadArgumentError("mindepth must be <= maxdepth.") if maxdepth > 99: raise exceptions.BadArgumentError("please don't try to exhaust maxdepth.") ltrace('fsapi', '''> minifind(%s, type=%s, mindepth=%s, maxdepth=%s, ''' '''exclude=%s, followlinks=%s, followmounts=%s)''' % ( path, type, mindepth, maxdepth, exclude, followlinks, followmounts)) paths_to_walk = [ path ] next_paths_to_walk = [] current_depth = 0 S_IFSTD = S_IFDIR | S_IFREG while True: if paths_to_walk != []: entry = paths_to_walk.pop(0) elif next_paths_to_walk != []: paths_to_walk = next_paths_to_walk next_paths_to_walk = [] entry = paths_to_walk.pop(0) current_depth += 1 else: break try: entry_stat = os.lstat(entry) entry_type = entry_stat.st_mode & 0170000 entry_mode = entry_stat.st_mode & 07777 if current_depth >= mindepth \ and ( (type is None and entry_type & S_IFSTD) or entry_type == type) \ and ( perms is None or (entry_mode & perms) ): yield entry if (entry_type & S_IFLNK and not followlinks) \ or (os.path.ismount(entry) and not followmounts): continue if entry_type & S_IFDIR and current_depth < maxdepth: for x in os.listdir(entry): if x not in exclude: next_paths_to_walk.append("%s/%s" % (entry, x)) except OSError, e: if e.errno == 2 or (e.errno == 13 and entry[-5:] == '.gvfs'): continue raise e
478,415
def minifind(path, type = None, perms = None, mindepth = 0, maxdepth = 99, exclude = [], followlinks = False, followmounts = False): """mimic the GNU find behaviour in python. returns an iterator. WARNING: recursive function !""" if mindepth > maxdepth: raise exceptions.BadArgumentError("mindepth must be <= maxdepth.") if maxdepth > 99: raise exceptions.BadArgumentError("please don't try to exhaust maxdepth.") logging.debug("starting minifind in %s, type=%s, mindepth=%s, maxdepth=%s, exclude=%s." \ % (path, type, mindepth, maxdepth, exclude)) paths_to_walk = [ path ] next_paths_to_walk = [] current_depth = 0 S_IFSTD = S_IFDIR | S_IFREG while True: if paths_to_walk != []: entry = paths_to_walk.pop(0) elif next_paths_to_walk != []: paths_to_walk = next_paths_to_walk next_paths_to_walk = [] entry = paths_to_walk.pop(0) current_depth += 1 else: break try: entry_stat = os.lstat(entry) entry_type = entry_stat.st_mode & 0170000 entry_mode = entry_stat.st_mode & 07777 if current_depth >= mindepth \ and ( (type is None and entry_type & S_IFSTD) or entry_type == type) \ and ( perms is None or (entry_mode & perms) ): yield entry if (entry_type & S_IFLNK and not followlinks) \ or (os.path.ismount(entry) and not followmounts): continue if entry_type & S_IFDIR and current_depth < maxdepth: for x in os.listdir(entry): if x not in exclude: next_paths_to_walk.append("%s/%s" % (entry, x)) except OSError, e: if e.errno == 2 or (e.errno == 13 and entry[-5:] == '.gvfs'): continue raise e
def minifind(path, type = None, perms = None, mindepth = 0, maxdepth = 99, exclude = [], followlinks = False, followmounts = False): """mimic the GNU find behaviour in python. returns an iterator. WARNING: recursive function !""" if mindepth > maxdepth: raise exceptions.BadArgumentError("mindepth must be <= maxdepth.") if maxdepth > 99: raise exceptions.BadArgumentError("please don't try to exhaust maxdepth.") logging.debug("starting minifind in %s, type=%s, mindepth=%s, maxdepth=%s, exclude=%s." \ % (path, type, mindepth, maxdepth, exclude)) paths_to_walk = [ path ] next_paths_to_walk = [] current_depth = 0 S_IFSTD = S_IFDIR | S_IFREG while True: if paths_to_walk != []: entry = paths_to_walk.pop(0) elif next_paths_to_walk != []: paths_to_walk = next_paths_to_walk next_paths_to_walk = [] entry = paths_to_walk.pop(0) current_depth += 1 else: break try: entry_stat = os.lstat(entry) entry_type = entry_stat.st_mode & 0170000 entry_mode = entry_stat.st_mode & 07777 if current_depth >= mindepth \ and ( (type is None and entry_type & S_IFSTD) or entry_type == type) \ and ( perms is None or (entry_mode & perms) ): yield entry if (entry_type & S_IFLNK and not followlinks) \ or (os.path.ismount(entry) and not followmounts): continue if entry_type & S_IFDIR and current_depth < maxdepth: for x in os.listdir(entry): if x not in exclude: next_paths_to_walk.append("%s/%s" % (entry, x)) except OSError, e: if e.errno == 2 or (e.errno == 13 and entry[-5:] == '.gvfs'): continue raise e
478,416
def minifind(path, type = None, perms = None, mindepth = 0, maxdepth = 99, exclude = [], followlinks = False, followmounts = False): """mimic the GNU find behaviour in python. returns an iterator. WARNING: recursive function !""" if mindepth > maxdepth: raise exceptions.BadArgumentError("mindepth must be <= maxdepth.") if maxdepth > 99: raise exceptions.BadArgumentError("please don't try to exhaust maxdepth.") logging.debug("starting minifind in %s, type=%s, mindepth=%s, maxdepth=%s, exclude=%s." \ % (path, type, mindepth, maxdepth, exclude)) paths_to_walk = [ path ] next_paths_to_walk = [] current_depth = 0 S_IFSTD = S_IFDIR | S_IFREG while True: if paths_to_walk != []: entry = paths_to_walk.pop(0) elif next_paths_to_walk != []: paths_to_walk = next_paths_to_walk next_paths_to_walk = [] entry = paths_to_walk.pop(0) current_depth += 1 else: break try: entry_stat = os.lstat(entry) entry_type = entry_stat.st_mode & 0170000 entry_mode = entry_stat.st_mode & 07777 if current_depth >= mindepth \ and ( (type is None and entry_type & S_IFSTD) or entry_type == type) \ and ( perms is None or (entry_mode & perms) ): yield entry if (entry_type & S_IFLNK and not followlinks) \ or (os.path.ismount(entry) and not followmounts): continue if entry_type & S_IFDIR and current_depth < maxdepth: for x in os.listdir(entry): if x not in exclude: next_paths_to_walk.append("%s/%s" % (entry, x)) except OSError, e: if e.errno == 2 or (e.errno == 13 and entry[-5:] == '.gvfs'): continue raise e
def minifind(path, type = None, perms = None, mindepth = 0, maxdepth = 99, exclude = [], followlinks = False, followmounts = False): """mimic the GNU find behaviour in python. returns an iterator. WARNING: recursive function !""" if mindepth > maxdepth: raise exceptions.BadArgumentError("mindepth must be <= maxdepth.") if maxdepth > 99: raise exceptions.BadArgumentError("please don't try to exhaust maxdepth.") logging.debug("starting minifind in %s, type=%s, mindepth=%s, maxdepth=%s, exclude=%s." \ % (path, type, mindepth, maxdepth, exclude)) paths_to_walk = [ path ] next_paths_to_walk = [] current_depth = 0 S_IFSTD = S_IFDIR | S_IFREG while True: if paths_to_walk != []: entry = paths_to_walk.pop(0) elif next_paths_to_walk != []: paths_to_walk = next_paths_to_walk next_paths_to_walk = [] entry = paths_to_walk.pop(0) current_depth += 1 else: break try: entry_stat = os.lstat(entry) entry_type = entry_stat.st_mode & 0170000 entry_mode = entry_stat.st_mode & 07777 if current_depth >= mindepth \ and ( (type is None and entry_type & S_IFSTD) \ or entry_type == type) \ and ( perms is None or (entry_mode & perms) ): yield entry if (entry_type & S_IFLNK and not followlinks) \ or (os.path.ismount(entry) and not followmounts): continue if entry_type & S_IFDIR and current_depth < maxdepth: for x in os.listdir(entry): if x not in exclude: next_paths_to_walk.append("%s/%s" % (entry, x)) except OSError, e: if e.errno == 2 or (e.errno == 13 and entry[-5:] == '.gvfs'): continue raise e
478,417
def minifind(path, type = None, perms = None, mindepth = 0, maxdepth = 99, exclude = [], followlinks = False, followmounts = False): """mimic the GNU find behaviour in python. returns an iterator. WARNING: recursive function !""" if mindepth > maxdepth: raise exceptions.BadArgumentError("mindepth must be <= maxdepth.") if maxdepth > 99: raise exceptions.BadArgumentError("please don't try to exhaust maxdepth.") logging.debug("starting minifind in %s, type=%s, mindepth=%s, maxdepth=%s, exclude=%s." \ % (path, type, mindepth, maxdepth, exclude)) paths_to_walk = [ path ] next_paths_to_walk = [] current_depth = 0 S_IFSTD = S_IFDIR | S_IFREG while True: if paths_to_walk != []: entry = paths_to_walk.pop(0) elif next_paths_to_walk != []: paths_to_walk = next_paths_to_walk next_paths_to_walk = [] entry = paths_to_walk.pop(0) current_depth += 1 else: break try: entry_stat = os.lstat(entry) entry_type = entry_stat.st_mode & 0170000 entry_mode = entry_stat.st_mode & 07777 if current_depth >= mindepth \ and ( (type is None and entry_type & S_IFSTD) or entry_type == type) \ and ( perms is None or (entry_mode & perms) ): yield entry if (entry_type & S_IFLNK and not followlinks) \ or (os.path.ismount(entry) and not followmounts): continue if entry_type & S_IFDIR and current_depth < maxdepth: for x in os.listdir(entry): if x not in exclude: next_paths_to_walk.append("%s/%s" % (entry, x)) except OSError, e: if e.errno == 2 or (e.errno == 13 and entry[-5:] == '.gvfs'): continue raise e
def minifind(path, type = None, perms = None, mindepth = 0, maxdepth = 99, exclude = [], followlinks = False, followmounts = False): """mimic the GNU find behaviour in python. returns an iterator. WARNING: recursive function !""" if mindepth > maxdepth: raise exceptions.BadArgumentError("mindepth must be <= maxdepth.") if maxdepth > 99: raise exceptions.BadArgumentError("please don't try to exhaust maxdepth.") logging.debug("starting minifind in %s, type=%s, mindepth=%s, maxdepth=%s, exclude=%s." \ % (path, type, mindepth, maxdepth, exclude)) paths_to_walk = [ path ] next_paths_to_walk = [] current_depth = 0 S_IFSTD = S_IFDIR | S_IFREG while True: if paths_to_walk != []: entry = paths_to_walk.pop(0) elif next_paths_to_walk != []: paths_to_walk = next_paths_to_walk next_paths_to_walk = [] entry = paths_to_walk.pop(0) current_depth += 1 else: break try: entry_stat = os.lstat(entry) entry_type = entry_stat.st_mode & 0170000 entry_mode = entry_stat.st_mode & 07777 if current_depth >= mindepth \ and ( (type is None and entry_type & S_IFSTD) or entry_type == type) \ and ( perms is None or (entry_mode & perms) ): yield entry if (entry_type == S_IFLNK and not followlinks) \ or (os.path.ismount(entry) and not followmounts): continue if entry_type & S_IFDIR and current_depth < maxdepth: for x in os.listdir(entry): if x not in exclude: next_paths_to_walk.append("%s/%s" % (entry, x)) except OSError, e: if e.errno == 2 or (e.errno == 13 and entry[-5:] == '.gvfs'): continue raise e
478,418
def minifind(path, type = None, perms = None, mindepth = 0, maxdepth = 99, exclude = [], followlinks = False, followmounts = False): """mimic the GNU find behaviour in python. returns an iterator. WARNING: recursive function !""" if mindepth > maxdepth: raise exceptions.BadArgumentError("mindepth must be <= maxdepth.") if maxdepth > 99: raise exceptions.BadArgumentError("please don't try to exhaust maxdepth.") logging.debug("starting minifind in %s, type=%s, mindepth=%s, maxdepth=%s, exclude=%s." \ % (path, type, mindepth, maxdepth, exclude)) paths_to_walk = [ path ] next_paths_to_walk = [] current_depth = 0 S_IFSTD = S_IFDIR | S_IFREG while True: if paths_to_walk != []: entry = paths_to_walk.pop(0) elif next_paths_to_walk != []: paths_to_walk = next_paths_to_walk next_paths_to_walk = [] entry = paths_to_walk.pop(0) current_depth += 1 else: break try: entry_stat = os.lstat(entry) entry_type = entry_stat.st_mode & 0170000 entry_mode = entry_stat.st_mode & 07777 if current_depth >= mindepth \ and ( (type is None and entry_type & S_IFSTD) or entry_type == type) \ and ( perms is None or (entry_mode & perms) ): yield entry if (entry_type & S_IFLNK and not followlinks) \ or (os.path.ismount(entry) and not followmounts): continue if entry_type & S_IFDIR and current_depth < maxdepth: for x in os.listdir(entry): if x not in exclude: next_paths_to_walk.append("%s/%s" % (entry, x)) except OSError, e: if e.errno == 2 or (e.errno == 13 and entry[-5:] == '.gvfs'): continue raise e
def minifind(path, type = None, perms = None, mindepth = 0, maxdepth = 99, exclude = [], followlinks = False, followmounts = False): """mimic the GNU find behaviour in python. returns an iterator. WARNING: recursive function !""" if mindepth > maxdepth: raise exceptions.BadArgumentError("mindepth must be <= maxdepth.") if maxdepth > 99: raise exceptions.BadArgumentError("please don't try to exhaust maxdepth.") logging.debug("starting minifind in %s, type=%s, mindepth=%s, maxdepth=%s, exclude=%s." \ % (path, type, mindepth, maxdepth, exclude)) paths_to_walk = [ path ] next_paths_to_walk = [] current_depth = 0 S_IFSTD = S_IFDIR | S_IFREG while True: if paths_to_walk != []: entry = paths_to_walk.pop(0) elif next_paths_to_walk != []: paths_to_walk = next_paths_to_walk next_paths_to_walk = [] entry = paths_to_walk.pop(0) current_depth += 1 else: break try: entry_stat = os.lstat(entry) entry_type = entry_stat.st_mode & 0170000 entry_mode = entry_stat.st_mode & 07777 if current_depth >= mindepth \ and ( (type is None and entry_type & S_IFSTD) or entry_type == type) \ and ( perms is None or (entry_mode & perms) ): yield entry if (entry_type & S_IFLNK and not followlinks) \ or (os.path.ismount(entry) and not followmounts): continue if entry_type & S_IFDIR and current_depth < maxdepth: for x in os.listdir(entry): if x not in exclude: next_paths_to_walk.append("%s/%s" % (entry, x)) else: ltrace('fsapi', ' minifind(excluded=%s)' % entry) except (IOError, OSError), e: if e.errno == 2 or (e.errno == 13 and entry[-5:] == '.gvfs'): continue raise e
478,419
def Prepare(self, cmd): """ Run commands mandatory for func_test to succeed. """
def Prepare(self, cmd): """ Run commands mandatory for func_test to succeed. """
478,420
def Prepare(self, cmd): """ Run commands mandatory for func_test to succeed. """
def Prepare(self, cmd): """ Run commands mandatory for func_test to succeed. """
478,421
def clean_system(): """ Remove all stuff to make the system clean, testsuite-wise.""" test_message('''cleaning system from previous runs.''') # delete them first in case of a previous failed testsuite run. # don't check exit codes or such, this will be done later. for argument in ( ['user', '''toto,tutu,tata,titi,test,utilisager.normal,''' \ '''test.responsibilly,utilicateur.accentue,user_test''' \ '''GRP-ACL-user''', '--no-archive'], ['profile', '--group=utilisagers', '--del-users', '--no-archive'], ['profile', '--group=responsibilisateurs', '--del-users', '--no-archive'], ['group', '''test_users_A,test_users_B,groupeA,B-Group_Test,''' \ '''groupe_a_skel,ACL_tests,MOD_tests,SYSTEM-test,SKEL-tests,''' \ '''ARCHIVES-test,group_test,GRP-ACL-test'''], ): execute(DEL + argument) os.system('sudo rm -rf %s/* %s/*' % (configuration.home_backup_dir, configuration.home_archive_dir)) test_message('''system cleaned from previous testsuite runs.''')
def clean_system(): """ Remove all stuff to make the system clean, testsuite-wise.""" test_message('''cleaning system from previous runs.''') # delete them first in case of a previous failed testsuite run. # don't check exit codes or such, this will be done later. for argument in ( ['user', '''toto,tutu,tata,titi,test,utilisager.normal,''' \ '''test.responsibilly,utilicateur.accentue,user_test,''' \ '''GRP-ACL-user''', '--no-archive'], ['profile', '--group=utilisagers', '--del-users', '--no-archive'], ['profile', '--group=responsibilisateurs', '--del-users', '--no-archive'], ['group', '''test_users_A,test_users_B,groupeA,B-Group_Test,''' \ '''groupe_a_skel,ACL_tests,MOD_tests,SYSTEM-test,SKEL-tests,''' \ '''ARCHIVES-test,group_test,GRP-ACL-test'''], ): execute(DEL + argument) os.system('sudo rm -rf %s/* %s/*' % (configuration.home_backup_dir, configuration.home_archive_dir)) test_message('''system cleaned from previous testsuite runs.''')
478,422
def chk_acls_cmds(group, subdir=None): return [ 'sudo', 'getfacl', '-R', '%s/%s/%s%s' % ( configuration.defaults.home_base_path, configuration.groups.names['plural'], group, '/%s' % subdir if subdir else '') ]
def chk_acls_cmds(group, subdir=None): return [ 'sudo', 'getfacl', '-R', '%s/%s/%s%s' % ( configuration.defaults.home_base_path, configuration.groups.names['plural'], group, '/%s' % subdir if subdir else '') ]
478,423
def chk_acls_cmds(group, subdir=None): return [ 'sudo', 'getfacl', '-R', '%s/%s/%s%s' % ( configuration.defaults.home_base_path, configuration.groups.names['plural'], group, '/%s' % subdir if subdir else '') ]
def chk_acls_cmds(group, subdir=None): return [ 'sudo', 'getfacl', '-R', '%s/%s/%s%s' % ( configuration.defaults.home_base_path, configuration.groups.names['plural'], group, '/%s' % subdir if subdir else '') ]
478,424
def chk_acls_cmds(group, subdir=None): return [ 'sudo', 'getfacl', '-R', '%s/%s/%s%s' % ( configuration.defaults.home_base_path, configuration.groups.names['plural'], group, '/%s' % subdir if subdir else '') ]
def chk_acls_cmds(group, subdir=None): return [ 'sudo', 'getfacl', '-R', '%s/%s/%s%s' % ( configuration.defaults.home_base_path, configuration.groups.names['plural'], group, '/%s' % subdir if subdir else '') ]
478,425
def chk_acls_cmds(group, subdir=None): return [ 'sudo', 'getfacl', '-R', '%s/%s/%s%s' % ( configuration.defaults.home_base_path, configuration.groups.names['plural'], group, '/%s' % subdir if subdir else '') ]
def chk_acls_cmds(group, subdir=None): return [ 'sudo', 'getfacl', '-R', '%s/%s/%s%s' % ( configuration.defaults.home_base_path, configuration.groups.names['plural'], group, '/%s' % subdir if subdir else '') ]
478,426
def load_groups(self): """ Load groups from /etc/{group,gshadow} and /etc/licorn/group. """
def load_groups(self): """ Load groups from /etc/{group,gshadow} and /etc/licorn/group. """
478,427
def __getitem__(self, item): return LicornWarningsDB.__warnings[item]
def __getitem__(self, item): return LicornWarningsDB.__warnings[item]
478,428
def __setitem__(self, item, value): LicornWarningsDB.__warningsdb[item] = value
def __setitem__(self, item, value): LicornWarningsDB.__warningsdb[item] = value
478,429
def keys(self): return LicornWarningsDB.__warningsdb.keys()
def keys(self): return LicornWarningsDB.__warningsdb.keys()
478,430
def __del__(self): # just in case it wasn't done before (in batched operations, for example). self.WriteConf()
def __del__(self): # just in case it wasn't done before (in batched operations, for example). self.WriteConf()
478,431
def reload(self): """ Load (or reload) the data structures from the system files. """ UsersController.users, UsersController.login_cache = self.backend.load_users(self.groups)
def reload(self): """ Load (or reload) the data structures from the system files. """ UsersController.users, UsersController.login_cache = self.backend.load_users(self.groups)
478,432
def Select( self, filter_string ): """ Filter user accounts on different criteria. Criteria are: - 'system users': show only «system» users (root, bin, daemon, apache...), not normal user account. - 'normal users': keep only «normal» users, which includes Licorn administrators - more to come... """
def Select( self, filter_string ): """ Filter user accounts on different criteria. Criteria are: - 'system users': show only «system» users (root, bin, daemon, apache...), not normal user account. - 'normal users': keep only «normal» users, which includes Licorn administrators - more to come... """
478,433
def Select( self, filter_string ): """ Filter user accounts on different criteria. Criteria are: - 'system users': show only «system» users (root, bin, daemon, apache...), not normal user account. - 'normal users': keep only «normal» users, which includes Licorn administrators - more to come... """
def Select( self, filter_string ): """ Filter user accounts on different criteria. Criteria are: - 'system users': show only «system» users (root, bin, daemon, apache...), not normal user account. - 'normal users': keep only «normal» users, which includes Licorn administrators - more to come... """
478,434
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
478,435
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
478,436
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
478,437
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
478,438
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
478,439
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
478,440
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
478,441
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
478,442
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
478,443
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
478,444
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
478,445
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
478,446
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
478,447
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
478,448
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
478,449
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
478,450
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
478,451
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
478,452
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
478,453
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
478,454
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
478,455
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
478,456
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
478,457
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
478,458
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
478,459
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
478,460
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
478,461
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
478,462
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
478,463
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
478,464
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
478,465
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
478,466
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
478,467
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
478,468
def DeleteUser(self, login=None, no_archive=False, uid=None, batch=False): """ Delete a user """ if login is None and uid is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LGN_OR_UID)
def DeleteUser(self, login=None, no_archive=False, uid=None, batch=False): """ Delete a user """ if login is None and uid is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LGN_OR_UID)
478,469
def DeleteUser(self, login=None, no_archive=False, uid=None, batch=False): """ Delete a user """ if login is None and uid is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LGN_OR_UID)
def DeleteUser(self, login=None, no_archive=False, uid=None, batch=False): """ Delete a user """ if login is None and uid is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LGN_OR_UID)
478,470
def DeleteUser(self, login=None, no_archive=False, uid=None, batch=False): """ Delete a user """ if login is None and uid is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LGN_OR_UID)
def DeleteUser(self, login=None, no_archive=False, uid=None, batch=False): """ Delete a user """ if login is None and uid is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LGN_OR_UID)
478,471
def DeleteUser(self, login=None, no_archive=False, uid=None, batch=False): """ Delete a user """ if login is None and uid is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LGN_OR_UID)
def DeleteUser(self, login=None, no_archive=False, uid=None, batch=False): """ Delete a user """ if login is None and uid is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LGN_OR_UID)
478,472
def DeleteUser(self, login=None, no_archive=False, uid=None, batch=False): """ Delete a user """ if login is None and uid is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LGN_OR_UID)
def DeleteUser(self, login=None, no_archive=False, uid=None, batch=False): """ Delete a user """ if login is None and uid is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LGN_OR_UID)
478,473
def DeleteUser(self, login=None, no_archive=False, uid=None, batch=False): """ Delete a user """ if login is None and uid is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LGN_OR_UID)
def DeleteUser(self, login=None, no_archive=False, uid=None, batch=False): """ Delete a user """ if login is None and uid is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LGN_OR_UID)
478,474
def DeleteUser(self, login=None, no_archive=False, uid=None, batch=False): """ Delete a user """ if login is None and uid is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LGN_OR_UID)
def DeleteUser(self, login=None, no_archive=False, uid=None, batch=False): """ Delete a user """ if login is None and uid is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LGN_OR_UID)
478,475
def ChangeUserPassword(self, login, password = None, display = False): """ Change the password of a user """ if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN) if password is None: password = hlstr.generate_password(UsersController.configuration.mAutoPasswdSize) elif password == "": logging.warning(logging.SYSU_SET_EMPTY_PASSWD % styles.stylize(styles.ST_LOGIN, login)) # TODO: automatically remove user from remotessh ?
def ChangeUserPassword(self, login, password = None, display = False): """ Change the password of a user """ if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN) if password is None: password = hlstr.generate_password( UsersController.configuration.mAutoPasswdSize) elif password == "": logging.warning(logging.SYSU_SET_EMPTY_PASSWD % styles.stylize(styles.ST_LOGIN, login)) # TODO: automatically remove user from remotessh ?
478,476
def ChangeUserPassword(self, login, password = None, display = False): """ Change the password of a user """ if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN) if password is None: password = hlstr.generate_password(UsersController.configuration.mAutoPasswdSize) elif password == "": logging.warning(logging.SYSU_SET_EMPTY_PASSWD % styles.stylize(styles.ST_LOGIN, login)) # TODO: automatically remove user from remotessh ?
def ChangeUserPassword(self, login, password = None, display = False): """ Change the password of a user """ if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN) if password is None: password = hlstr.generate_password(UsersController.configuration.mAutoPasswdSize) elif password == "": logging.warning(logging.SYSU_SET_EMPTY_PASSWD % styles.stylize(styles.ST_LOGIN, login)) # TODO: automatically remove user from remotessh ?
478,477
def ChangeUserPassword(self, login, password = None, display = False): """ Change the password of a user """ if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN) if password is None: password = hlstr.generate_password(UsersController.configuration.mAutoPasswdSize) elif password == "": logging.warning(logging.SYSU_SET_EMPTY_PASSWD % styles.stylize(styles.ST_LOGIN, login)) # TODO: automatically remove user from remotessh ?
def ChangeUserPassword(self, login, password = None, display = False): """ Change the password of a user """ if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN) if password is None: password = hlstr.generate_password(UsersController.configuration.mAutoPasswdSize) elif password == "": logging.warning(logging.SYSU_SET_EMPTY_PASSWD % styles.stylize(styles.ST_LOGIN, login)) # TODO: automatically remove user from remotessh ?
478,478
def ChangeUserPassword(self, login, password = None, display = False): """ Change the password of a user """ if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN) if password is None: password = hlstr.generate_password(UsersController.configuration.mAutoPasswdSize) elif password == "": logging.warning(logging.SYSU_SET_EMPTY_PASSWD % styles.stylize(styles.ST_LOGIN, login)) # TODO: automatically remove user from remotessh ?
def ChangeUserPassword(self, login, password = None, display = False): """ Change the password of a user """ if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN) if password is None: password = hlstr.generate_password(UsersController.configuration.mAutoPasswdSize) elif password == "": logging.warning(logging.SYSU_SET_EMPTY_PASSWD % styles.stylize(styles.ST_LOGIN, login)) # TODO: automatically remove user from remotessh ?
478,479
def ChangeUserPassword(self, login, password = None, display = False): """ Change the password of a user """ if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN) if password is None: password = hlstr.generate_password(UsersController.configuration.mAutoPasswdSize) elif password == "": logging.warning(logging.SYSU_SET_EMPTY_PASSWD % styles.stylize(styles.ST_LOGIN, login)) # TODO: automatically remove user from remotessh ?
def ChangeUserPassword(self, login, password = None, display = False): """ Change the password of a user """ if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN) if password is None: password = hlstr.generate_password(UsersController.configuration.mAutoPasswdSize) elif password == "": logging.warning(logging.SYSU_SET_EMPTY_PASSWD % styles.stylize(styles.ST_LOGIN, login)) # TODO: automatically remove user from remotessh ?
478,480
def ChangeUserPassword(self, login, password = None, display = False): """ Change the password of a user """ if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN) if password is None: password = hlstr.generate_password(UsersController.configuration.mAutoPasswdSize) elif password == "": logging.warning(logging.SYSU_SET_EMPTY_PASSWD % styles.stylize(styles.ST_LOGIN, login)) # TODO: automatically remove user from remotessh ?
def ChangeUserPassword(self, login, password = None, display = False): """ Change the password of a user """ if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN) if password is None: password = hlstr.generate_password(UsersController.configuration.mAutoPasswdSize) elif password == "": logging.warning(logging.SYSU_SET_EMPTY_PASSWD % styles.stylize(styles.ST_LOGIN, login)) # TODO: automatically remove user from remotessh ?
478,481
def ChangeUserGecos(self, login, gecos = ""): """ Change the gecos of a user """ if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN)
def ChangeUserGecos(self, login, gecos = ""): """ Change the gecos of a user """ if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN)
478,482
def ChangeUserShell(self, login, shell = ""): """ Change the shell of a user. """ if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN)
def ChangeUserShell(self, login, shell = ""): """ Change the shell of a user. """ if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN)
478,483
def LockAccount(self, login, lock = True): """(Un)Lock a user account.""" if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN)
def LockAccount(self, login, lock = True): """(Un)Lock a user account.""" if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN)
478,484
def ApplyUserSkel(self, login, skel): """ Apply a skel on a user """ if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN) if skel is None: raise exceptions.BadArgumentError, "You must specify a skel" if not os.path.isabs(skel) or not os.path.isdir(skel): raise exceptions.AbsolutePathError(skel)
def ApplyUserSkel(self, login, skel): """ Apply a skel on a user """ if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN) if skel is None: raise exceptions.BadArgumentError, "You must specify a skel" if not os.path.isabs(skel) or not os.path.isdir(skel): raise exceptions.AbsolutePathError(skel)
478,485
def ApplyUserSkel(self, login, skel): """ Apply a skel on a user """ if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN) if skel is None: raise exceptions.BadArgumentError, "You must specify a skel" if not os.path.isabs(skel) or not os.path.isdir(skel): raise exceptions.AbsolutePathError(skel)
def ApplyUserSkel(self, login, skel): """ Apply a skel on a user """ if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN) if skel is None: raise exceptions.BadArgumentError, "You must specify a skel" if not os.path.isabs(skel) or not os.path.isdir(skel): raise exceptions.AbsolutePathError(skel)
478,486
def ApplyUserSkel(self, login, skel): """ Apply a skel on a user """ if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN) if skel is None: raise exceptions.BadArgumentError, "You must specify a skel" if not os.path.isabs(skel) or not os.path.isdir(skel): raise exceptions.AbsolutePathError(skel)
def ApplyUserSkel(self, login, skel): """ Apply a skel on a user """ if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN) if skel is None: raise exceptions.BadArgumentError, "You must specify a skel" if not os.path.isabs(skel) or not os.path.isdir(skel): raise exceptions.AbsolutePathError(skel)
478,487
def ApplyUserSkel(self, login, skel): """ Apply a skel on a user """ if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN) if skel is None: raise exceptions.BadArgumentError, "You must specify a skel" if not os.path.isabs(skel) or not os.path.isdir(skel): raise exceptions.AbsolutePathError(skel)
def ApplyUserSkel(self, login, skel): """ Apply a skel on a user """ if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN) if skel is None: raise exceptions.BadArgumentError, "You must specify a skel" if not os.path.isabs(skel) or not os.path.isdir(skel): raise exceptions.AbsolutePathError(skel)
478,488
def build_xml_output_user_data(uid): data = '''
def build_xml_output_user_data(uid): data = '''
478,489
def CheckUsers(self, users_to_check = [], minimal = True, batch = False, auto_answer = None): """Check user accounts and account data consistency."""
def CheckUsers(self, users_to_check = [], minimal = True, batch = False, auto_answer = None): """Check user accounts and account data consistency."""
478,490
def check_user(user, minimal = minimal, batch = batch, auto_answer = auto_answer):
def check_user(user, minimal = minimal, batch = batch, auto_answer = auto_answer):
478,491
def check_user(user, minimal = minimal, batch = batch, auto_answer = auto_answer):
def check_user(user, minimal = minimal, batch = batch, auto_answer = auto_answer):
478,492
def check_user(user, minimal = minimal, batch = batch, auto_answer = auto_answer):
def check_user(user, minimal = minimal, batch = batch, auto_answer = auto_answer):
478,493
def check_user(user, minimal = minimal, batch = batch, auto_answer = auto_answer):
def check_user(user, minimal = minimal, batch = batch, auto_answer = auto_answer):
478,494
def check_user(user, minimal = minimal, batch = batch, auto_answer = auto_answer):
def check_user(user, minimal = minimal, batch = batch, auto_answer = auto_answer):
478,495
def check_user(user, minimal = minimal, batch = batch, auto_answer = auto_answer):
def check_user(user, minimal = minimal, batch = batch, auto_answer = auto_answer):
478,496
def check_user(user, minimal = minimal, batch = batch, auto_answer = auto_answer):
def check_user(user, minimal = minimal, batch = batch, auto_answer = auto_answer):
478,497
def check_user(user, minimal = minimal, batch = batch, auto_answer = auto_answer):
def check_user(user, minimal = minimal, batch = batch, auto_answer = auto_answer):
478,498
def check_user(user, minimal = minimal, batch = batch, auto_answer = auto_answer):
def check_user(user, minimal = minimal, batch = batch, auto_answer = auto_answer):
478,499