From e38310908014d178fef0fb0dfe721fe6249288a0 Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Fri, 30 May 2014 10:17:38 +0200 Subject: [PATCH] resolved PEP8 issue E265 block comment should start with '# ' --- cobbler/action_hardlink.py | 6 ++-- cobbler/action_reposync.py | 2 +- cobbler/api.py | 12 ++++---- cobbler/cli.py | 6 ++-- cobbler/collection_files.py | 2 +- cobbler/collection_images.py | 2 +- cobbler/collection_mgmtclasses.py | 2 +- cobbler/collection_packages.py | 2 +- cobbler/collection_profiles.py | 2 +- cobbler/collection_repos.py | 4 +-- cobbler/collection_systems.py | 2 +- cobbler/configgen.py | 10 +++--- cobbler/kickgen.py | 10 +++--- cobbler/modules/authn_spacewalk.py | 4 +-- cobbler/modules/manage_import_signatures.py | 4 +-- cobbler/modules/serializer_catalog.py | 2 +- cobbler/pxegen.py | 2 +- cobbler/remote.py | 2 +- cobbler/utils.py | 20 ++++++------ setup.py | 34 ++++++++++----------- tests/cobbler_xmlrpc_test.py | 2 +- web/cobbler_web/templatetags/site.py | 20 ++++++------ web/cobbler_web/views.py | 28 ++++++++--------- web/urls.py | 4 +-- 24 files changed, 92 insertions(+), 92 deletions(-) diff --git a/cobbler/action_hardlink.py b/cobbler/action_hardlink.py index ed01f86843..88bd117c61 100644 --- a/cobbler/action_hardlink.py +++ b/cobbler/action_hardlink.py @@ -31,9 +31,9 @@ def __init__(self, config, logger=None): """ Constructor """ - #self.config = config - #self.api = config.api - #self.settings = config.settings() + # self.config = config + # self.api = config.api + # self.settings = config.settings() if logger is None: logger = clogger.Logger() self.logger = logger diff --git a/cobbler/action_reposync.py b/cobbler/action_reposync.py index a3c42d5736..54e813c03c 100644 --- a/cobbler/action_reposync.py +++ b/cobbler/action_reposync.py @@ -479,7 +479,7 @@ def apt_sync(self, repo): # NOTE: Dropping @@suite@@ replace as it is also dropped from # from manage_import_debian_ubuntu.py due that repo has no os_version # attribute. If it is added again it will break the Web UI! - #mirror = repo.mirror.replace("@@suite@@",repo.os_version) + # mirror = repo.mirror.replace("@@suite@@",repo.os_version) mirror = repo.mirror idx = mirror.find("://") diff --git a/cobbler/api.py b/cobbler/api.py index 3772ffd2a2..671ed187b1 100644 --- a/cobbler/api.py +++ b/cobbler/api.py @@ -898,8 +898,8 @@ def import_tree(self, mirror_url, mirror_name, network_root=None, kickstart_file self.log("Network root given to --available-as is missing a colon, please see the manpage example.") return False - #importer_modules = self.get_modules_in_category("manage/import") - #for importer_module in importer_modules: + # importer_modules = self.get_modules_in_category("manage/import") + # for importer_module in importer_modules: # manager = importer_module.get_import_manager(self._config,logger) # try: # (found,pkgdir) = manager.check_for_signature(path,breed) @@ -910,10 +910,10 @@ def import_tree(self, mirror_url, mirror_name, network_root=None, kickstart_file # self.log("an exception occured while running the import manager") # self.log("error was: %s" % sys.exc_info()[1]) # continue - #self.log("No import managers found a valid signature at the location specified") - ## FIXME: since we failed, we should probably remove the - ## path tree we created above so we don't leave cruft around - #return False + # self.log("No import managers found a valid signature at the location specified") + # # FIXME: since we failed, we should probably remove the + # # path tree we created above so we don't leave cruft around + # return False import_module = self.get_module_by_name("manage_import_signatures").get_import_manager(self._config, logger) return import_module.run(path, mirror_name, network_root, kickstart_file, arch, breed, os_version) diff --git a/cobbler/cli.py b/cobbler/cli.py index 93ce22fd1e..a25e598f20 100755 --- a/cobbler/cli.py +++ b/cobbler/cli.py @@ -609,9 +609,9 @@ def follow_task(self, task_id): # adapted from: http://code.activestate.com/recipes/157035/ file = open(logfile, 'r') # Find the size of the file and move to the end - #st_results = os.stat(filename) - #st_size = st_results[6] - #file.seek(st_size) + # st_results = os.stat(filename) + # st_size = st_results[6] + # file.seek(st_size) while 1: where = file.tell() diff --git a/cobbler/collection_files.py b/cobbler/collection_files.py index 6b5d1d4075..3e9a233790 100644 --- a/cobbler/collection_files.py +++ b/cobbler/collection_files.py @@ -26,7 +26,7 @@ from cexceptions import CX from utils import _ -#-------------------------------------------- +# -------------------------------------------- class Files(collection.Collection): diff --git a/cobbler/collection_images.py b/cobbler/collection_images.py index 146585bdb1..afc6dffbc5 100644 --- a/cobbler/collection_images.py +++ b/cobbler/collection_images.py @@ -20,7 +20,7 @@ from utils import _ import action_litesync -#-------------------------------------------- +# -------------------------------------------- class Images(collection.Collection): diff --git a/cobbler/collection_mgmtclasses.py b/cobbler/collection_mgmtclasses.py index 47a1d89f54..2e58f3c42c 100644 --- a/cobbler/collection_mgmtclasses.py +++ b/cobbler/collection_mgmtclasses.py @@ -26,7 +26,7 @@ from cexceptions import CX from utils import _ -#-------------------------------------------- +# -------------------------------------------- class Mgmtclasses(collection.Collection): diff --git a/cobbler/collection_packages.py b/cobbler/collection_packages.py index 98e2dac2a3..fc37b4c56f 100644 --- a/cobbler/collection_packages.py +++ b/cobbler/collection_packages.py @@ -26,7 +26,7 @@ from cexceptions import CX from utils import _ -#-------------------------------------------- +# -------------------------------------------- class Packages(collection.Collection): diff --git a/cobbler/collection_profiles.py b/cobbler/collection_profiles.py index f2cf821584..7030586e9f 100644 --- a/cobbler/collection_profiles.py +++ b/cobbler/collection_profiles.py @@ -30,7 +30,7 @@ import action_litesync from utils import _ -#-------------------------------------------- +# -------------------------------------------- class Profiles(collection.Collection): diff --git a/cobbler/collection_repos.py b/cobbler/collection_repos.py index b503754fe1..b517ee58d3 100644 --- a/cobbler/collection_repos.py +++ b/cobbler/collection_repos.py @@ -31,7 +31,7 @@ TESTMODE = False -#-------------------------------------------- +# -------------------------------------------- class Repos(collection.Collection): @@ -71,7 +71,7 @@ def remove(self, name, with_delete=True, with_sync=True, with_triggers=True, rec utils.run_triggers(self.config.api, obj, "/var/lib/cobbler/triggers/delete/repo/post/*", [], logger) utils.run_triggers(self.config.api, obj, "/var/lib/cobbler/triggers/change/*", [], logger) - #FIXME: better use config.settings() webdir? + # FIXME: better use config.settings() webdir? path = "/var/www/cobbler/repo_mirror/%s" % obj.name if os.path.exists("/srv/www/"): path = "/srv/www/cobbler/repo_mirror/%s" % obj.name diff --git a/cobbler/collection_systems.py b/cobbler/collection_systems.py index 702f99dc4c..cadffc4c07 100644 --- a/cobbler/collection_systems.py +++ b/cobbler/collection_systems.py @@ -28,7 +28,7 @@ import action_litesync from utils import _ -#-------------------------------------------- +# -------------------------------------------- class Systems(collection.Collection): diff --git a/cobbler/configgen.py b/cobbler/configgen.py index d74d691dc9..6197b10a94 100644 --- a/cobbler/configgen.py +++ b/cobbler/configgen.py @@ -49,14 +49,14 @@ def __init__(self, hostname): self.logger = clogger.Logger("/var/log/cobbler/cobbler.log") self.mgmtclasses = self.get_cobbler_resource('mgmt_classes') - #---------------------------------------------------------------------- + # ---------------------------------------------------------------------- def resolve_resource_var(self, string_data): """Substitute variables in strings.""" data = string.Template(string_data).substitute(self.host_vars) return data - #---------------------------------------------------------------------- + # ---------------------------------------------------------------------- def resolve_resource_list(self, list_data): """Substitute variables in lists. Return new list.""" @@ -65,13 +65,13 @@ def resolve_resource_list(self, list_data): new_list.append(string.Template(item).substitute(self.host_vars)) return new_list - #---------------------------------------------------------------------- + # ---------------------------------------------------------------------- def get_cobbler_resource(self, resource): """Wrapper around cobbler blender method""" return cobbler.utils.blender(self.handle, False, self.system)[resource] - #---------------------------------------------------------------------- + # ---------------------------------------------------------------------- def gen_config_data(self): """ @@ -148,7 +148,7 @@ def gen_config_data(self): config_data['files'] = file_data return config_data - #---------------------------------------------------------------------- + # ---------------------------------------------------------------------- def gen_config_data_for_koan(self): """Encode configuration data. Return json object for Koan.""" diff --git a/cobbler/kickgen.py b/cobbler/kickgen.py index 6e543c2957..3f37b75340 100644 --- a/cobbler/kickgen.py +++ b/cobbler/kickgen.py @@ -106,8 +106,8 @@ def generate_autoyast(self, profile=None, system=None, raw_data=None): # add some cobbler information to the XML file # maybe that should be configureable if addComment == 1: - #startComment = document.createComment("\ncobbler_system_name=$system_name\ncobbler_server=$server\n#raw\n") - #endComment = document.createComment("\n#end raw\n") + # startComment = document.createComment("\ncobbler_system_name=$system_name\ncobbler_server=$server\n#raw\n") + # endComment = document.createComment("\n#end raw\n") cobblerElement = document.createElement("cobbler") cobblerElementSystem = xml.dom.minidom.Element("system_name") cobblerElementProfile = xml.dom.minidom.Element("profile_name") @@ -129,9 +129,9 @@ def generate_autoyast(self, profile=None, system=None, raw_data=None): # FIXME: this is all broken and no longer works. # this entire if block should probably not be # hard-coded anyway - #self.api.log(document.childNodes[2].childNodes) - #document.childNodes[1].insertBefore( cobblerElement, document.childNodes[2].childNodes[1]) - #document.childNodes[1].insertBefore( cobblerElement, document.childNodes[1].childNodes[0]) + # self.api.log(document.childNodes[2].childNodes) + # document.childNodes[1].insertBefore( cobblerElement, document.childNodes[2].childNodes[1]) + # document.childNodes[1].insertBefore( cobblerElement, document.childNodes[1].childNodes[0]) name = profile.name if system is not None: diff --git a/cobbler/modules/authn_spacewalk.py b/cobbler/modules/authn_spacewalk.py index 13be86f03e..eaa722ee74 100644 --- a/cobbler/modules/authn_spacewalk.py +++ b/cobbler/modules/authn_spacewalk.py @@ -50,10 +50,10 @@ def __looks_like_a_token(password): # tokens are always lowercase, this isn't a token return False - #try: + # try: # #data = binascii.unhexlify(password) # return True # looks like a token, but we can't be sure - #except: + # except: # return False # definitely not a token return (len(password) > 45) diff --git a/cobbler/modules/manage_import_signatures.py b/cobbler/modules/manage_import_signatures.py index 273ef860c1..32e01e6686 100644 --- a/cobbler/modules/manage_import_signatures.py +++ b/cobbler/modules/manage_import_signatures.py @@ -159,7 +159,7 @@ def scan_signatures(self): the signature directory and the version file """ sigdata = self.api.get_signatures() - #self.logger.debug("signature cache: %s" % str(sigdata)) + # self.logger.debug("signature cache: %s" % str(sigdata)) for breed in sigdata["breeds"].keys(): if self.breed and self.breed != breed: continue @@ -235,7 +235,7 @@ def distro_adder(self, distros_added, dirname, fnames): if os.path.islink(fullname) and os.path.isdir(fullname): if fullname.startswith(self.path): # Prevent infinite loop with Sci Linux 5 - #self.logger.warning("avoiding symlink loop") + # self.logger.warning("avoiding symlink loop") continue self.logger.info("following symlink: %s" % fullname) os.path.walk(fullname, self.distro_adder, distros_added) diff --git a/cobbler/modules/serializer_catalog.py b/cobbler/modules/serializer_catalog.py index 65eef29087..19d4162953 100644 --- a/cobbler/modules/serializer_catalog.py +++ b/cobbler/modules/serializer_catalog.py @@ -94,7 +94,7 @@ def serialize_item(obj, item): datastruct = item.to_datastruct() fd = open(filename, "w+") data = simplejson.dumps(datastruct, encoding="utf-8", sort_keys=sort_keys, indent=indent) - #data = data.encode('utf-8') + # data = data.encode('utf-8') fd.write(data) else: diff --git a/cobbler/pxegen.py b/cobbler/pxegen.py index c23795e237..8d571c0fdb 100644 --- a/cobbler/pxegen.py +++ b/cobbler/pxegen.py @@ -131,7 +131,7 @@ def copy_bootloaders(self): shutil.rmtree(os.path.join(self.bootloc, 'boot')) for i in self.distros: if 'nexenta' == i.breed and not pxegrub_imported: - #name_without_arch = i.name[:-7] # removing -x86_64 from the fin on the string. + # name_without_arch = i.name[:-7] # removing -x86_64 from the fin on the string. shutil.copytree(os.path.join('/var', 'www', 'cobbler', 'ks_mirror', i.name, 'boot'), os.path.join(self.bootloc, 'boot')) pxegrub_imported = True diff --git a/cobbler/remote.py b/cobbler/remote.py index 6559835642..73205c0074 100644 --- a/cobbler/remote.py +++ b/cobbler/remote.py @@ -1060,7 +1060,7 @@ def get_kickstart_templates(self, token=None, **rest): Returns all of the kickstarts that are in use by the system. """ self._log("get_kickstart_templates", token=token) - #self.check_access(token, "get_kickstart_templates") + # self.check_access(token, "get_kickstart_templates") return utils.get_kickstart_templates(self.api) def get_snippets(self, token=None, **rest): diff --git a/cobbler/utils.py b/cobbler/utils.py index 8da3ebc2f7..bf8a9dd154 100644 --- a/cobbler/utils.py +++ b/cobbler/utils.py @@ -342,10 +342,10 @@ def find_kernel(path): return None if os.path.isfile(path): - #filename = os.path.basename(path) - #if _re_kernel.match(filename): + # filename = os.path.basename(path) + # if _re_kernel.match(filename): # return path - #elif filename == "vmlinuz": + # elif filename == "vmlinuz": # return path return path @@ -390,10 +390,10 @@ def find_initrd(path): return None if os.path.isfile(path): - #filename = os.path.basename(path) - #if _re_initrd.match(filename): + # filename = os.path.basename(path) + # if _re_initrd.match(filename): # return path - #if filename == "initrd.img" or filename == "initrd": + # if filename == "initrd.img" or filename == "initrd": # return path return path @@ -579,12 +579,12 @@ def input_boolean(value): def update_settings_file(data): if 1: - #clogger.Logger().debug("in update_settings_file(): value is: %s" % str(value)) + # clogger.Logger().debug("in update_settings_file(): value is: %s" % str(value)) settings_file = file("/etc/cobbler/settings", "w") yaml.safe_dump(data, settings_file) settings_file.close() return True - #except: + # except: # return False @@ -1902,7 +1902,7 @@ def to_datastruct_from_fields(obj, fields): # they are the only exception in Cobbler. if obj.COLLECTION_TYPE == "system": ds["interfaces"] = copy.deepcopy(obj.interfaces) - #for interface in ds["interfaces"].keys(): + # for interface in ds["interfaces"].keys(): # for k in ds["interfaces"][interface].keys(): # if field_info.DEPRECATED_FIELDS.has_key(k): # ds["interfaces"][interface][field_info.DEPRECATED_FIELDS[k]] = ds["interfaces"][interface][k] @@ -2011,7 +2011,7 @@ def add_options_from_fields(object_type, parser, fields, object_action): parser.add_option("--recursive", action="store_true", dest="recursive", help="also delete child objects") # FIXME: not supported in 2.0 ? - #if not object_action in ["dumpvars","find","remove","report","list"]: + # if not object_action in ["dumpvars","find","remove","report","list"]: # parser.add_option("--no-sync", action="store_true", dest="nosync", help="suppress sync for speed") # FIXME: not supported in 2.0 ? # if not matches_args(args,["dumpvars","report","list"]): diff --git a/setup.py b/setup.py index b64f9e2dbd..e407f6b65f 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ ##################################################################### -## Helper Functions ################################################# +# # Helper Functions ################################################# ##################################################################### def glob(*args, **kwargs): @@ -85,7 +85,7 @@ def gen_build_version(): fd.close() ##################################################################### -## Custom Distribution Class ######################################## +# # Custom Distribution Class ######################################## ##################################################################### @@ -97,7 +97,7 @@ def __init__(self, *args, **kwargs): _Distribution.__init__(self, *args, **kwargs) ##################################################################### -## Modify Build Stage ############################################## +# # Modify Build Stage ############################################## ##################################################################### @@ -109,7 +109,7 @@ def run(self): _build_py.run(self) ##################################################################### -## Modify Build Stage ############################################## +# # Modify Build Stage ############################################## ##################################################################### @@ -120,7 +120,7 @@ def run(self): _build.run(self) ##################################################################### -## Configure files ################################################## +# # Configure files ################################################## ##################################################################### @@ -263,7 +263,7 @@ def has_man_pages(build): )) ##################################################################### -## Build man pages ################################################## +# # Build man pages ################################################## ##################################################################### @@ -328,7 +328,7 @@ def build_one_file(self, infile, outfile): ##################################################################### -## Modify Install Stage ############################################ +# # Modify Install Stage ############################################ ##################################################################### @@ -384,7 +384,7 @@ def run(self): ##################################################################### -## Test Command ##################################################### +# # Test Command ##################################################### ##################################################################### @@ -426,7 +426,7 @@ def run(self): len(result.errors) > 0))) ##################################################################### -## state command base class ######################################### +# # state command base class ######################################### ##################################################################### @@ -458,7 +458,7 @@ def _copy(self, frm, to): shutil.copy2(frm, to) ##################################################################### -## restorestate command ############################################# +# # restorestate command ############################################# ##################################################################### @@ -485,7 +485,7 @@ def run(self): self._copy(os.path.join(self.statepath, 'rsync.template'), etcpath) ##################################################################### -## savestate command ################################################ +# # savestate command ################################################ ##################################################################### @@ -518,10 +518,10 @@ def run(self): ##################################################################### -## Actual Setup.py Script ########################################### +# # Actual Setup.py Script ########################################### ##################################################################### if __name__ == "__main__": - ## Configurable installation roots for various data files. + # # Configurable installation roots for various data files. # Trailing slashes on these vars is to allow for easy # later configuration of relative paths if desired. @@ -653,7 +653,7 @@ def run(self): ("%sreporting" % etcpath, glob("templates/reporting/*")), ("%spower" % etcpath, glob("templates/power/*")), ("%sldap" % etcpath, glob("templates/ldap/*")), - #Build empty directories to hold triggers + # Build empty directories to hold triggers ("%striggers/add/distro/pre" % libpath, []), ("%striggers/add/distro/post" % libpath, []), ("%striggers/add/profile/pre" % libpath, []), @@ -688,7 +688,7 @@ def run(self): ("%striggers/sync/pre" % libpath, []), ("%striggers/sync/post" % libpath, []), ("%striggers/change" % libpath, []), - #Build empty directories to hold the database + # Build empty directories to hold the database ("%sconfig" % libpath, []), ("%sconfig/distros.d" % libpath, []), ("%sconfig/images.d" % libpath, []), @@ -698,7 +698,7 @@ def run(self): ("%sconfig/mgmtclasses.d" % libpath, []), ("%sconfig/packages.d" % libpath, []), ("%sconfig/files.d" % libpath, []), - #Build empty directories to hold koan localconfig + # Build empty directories to hold koan localconfig ("/var/lib/koan/config", []), # logfiles ("%scobbler/kicklog" % logpath, []), @@ -719,7 +719,7 @@ def run(self): ("%scobbler/pub" % webroot, []), ("%scobbler/rendered" % webroot, []), ("%scobbler/images" % webroot, []), - #A script that isn't really data, wsgi script + # A script that isn't really data, wsgi script ("%scobbler/svc/" % webroot, ["bin/services.py"]), # zone-specific templates directory ("%szone_templates" % etcpath, []), diff --git a/tests/cobbler_xmlrpc_test.py b/tests/cobbler_xmlrpc_test.py index d5f9ad1987..3feb4e7ffa 100644 --- a/tests/cobbler_xmlrpc_test.py +++ b/tests/cobbler_xmlrpc_test.py @@ -319,7 +319,7 @@ def _create_distro(self): # FIXME: if field in item_.FIELDS defines possible values, # test all of them. This is valid for all item types - #for field in item_system.FIELDS: + # for field in item_system.FIELDS: # (fname,def1,def2,display,editable,tooltip,values,type) = field # if fname not in ["name","distro","parent"] and editable: # if values and isinstance(values,list): diff --git a/web/cobbler_web/templatetags/site.py b/web/cobbler_web/templatetags/site.py index 5ba8402442..1fc64127ff 100644 --- a/web/cobbler_web/templatetags/site.py +++ b/web/cobbler_web/templatetags/site.py @@ -3,7 +3,7 @@ register = template.Library() -#========================== +# ========================== # -*- coding: utf-8 -*- ''' @@ -22,9 +22,9 @@ register = template.Library() -#=============================================================================== +# =============================================================================== # Calculation objects -#=============================================================================== +# =============================================================================== class BaseCalc(object): def __init__(self, var1, var2=None, negate=False): @@ -80,9 +80,9 @@ def calculate(self, var1, var2): return var1 in var2 -#=============================================================================== +# =============================================================================== # Tests -#=============================================================================== +# =============================================================================== class TestVar(object): """ @@ -280,9 +280,9 @@ def get_var(self): return self.create_var(token) -#=============================================================================== +# =============================================================================== # Actual templatetag code. -#=============================================================================== +# =============================================================================== class TemplateIfParser(IfParser): error_class = template.TemplateSyntaxError @@ -327,7 +327,7 @@ def get_nodes_by_type(self, nodetype): return nodes -#@register.tag('if') +# @register.tag('if') def smart_if(parser, token): ''' A smarter {% if %} tag for django templates. @@ -356,11 +356,11 @@ def smart_if(parser, token): return SmartIfNode(var, nodelist_true, nodelist_false) -#========================== +# ========================== ifinlist = register.tag(smart_if) -#========================== +# ========================== # Based on code found here: # http://stackoverflow.com/questions/2024660/django-sort-dict-in-template diff --git a/web/cobbler_web/views.py b/web/cobbler_web/views.py index 69be7abb4e..3edec21bdd 100644 --- a/web/cobbler_web/views.py +++ b/web/cobbler_web/views.py @@ -27,7 +27,7 @@ remote = None username = None -#================================================================================== +# ================================================================================== def index(request): @@ -44,7 +44,7 @@ def index(request): })) return HttpResponse(html) -#======================================================================== +# ======================================================================== def task_created(request): @@ -60,7 +60,7 @@ def task_created(request): })) return HttpResponse(html) -#======================================================================== +# ======================================================================== def error_page(request, message): @@ -81,7 +81,7 @@ def error_page(request, message): })) return HttpResponse(html) -#================================================================================== +# ================================================================================== def get_fields(what, is_subobject, seed_item=None): @@ -169,7 +169,7 @@ def get_fields(what, is_subobject, seed_item=None): # as we have no HTML hash widget (yet) if isinstance(elem["value"], dict): if elem["name"] == "mgmt_parameters": - #Render dictionary as YAML for Management Parameters field + # Render dictionary as YAML for Management Parameters field tokens = [] for (x, y) in elem["value"].items(): if y is not None: @@ -220,7 +220,7 @@ def get_fields(what, is_subobject, seed_item=None): return fields -#================================================================================== +# ================================================================================== def __tweak_field(fields, field_name, attribute, value): @@ -232,7 +232,7 @@ def __tweak_field(fields, field_name, attribute, value): if x["name"] == field_name: x[attribute] = value -#================================================================================== +# ================================================================================== def __format_columns(column_names, sort_field): @@ -261,7 +261,7 @@ def __format_columns(column_names, sort_field): return dataset -#================================================================================== +# ================================================================================== def __format_items(items, column_names): @@ -284,7 +284,7 @@ def __format_items(items, column_names): dataset.append(row) return dataset -#================================================================================== +# ================================================================================== def genlist(request, what, page=None): @@ -885,7 +885,7 @@ def setting_edit(request, setting_name=None): t = get_template('generic_edit.tmpl') html = t.render(RequestContext(request, { 'what': 'setting', - #'fields': fields, + # 'fields': fields, 'sections': sections, 'subobject': False, 'editmode': 'edit', @@ -1047,9 +1047,9 @@ def replicate(request): this command. """ - #settings = remote.get_settings() - #options = settings # just load settings from file until we decide to ask user (later?) - #remote.background_replicate(options, request.session['token']) + # settings = remote.get_settings() + # options = settings # just load settings from file until we decide to ask user (later?) + # remote.background_replicate(options, request.session['token']) if not test_user_authenticated(request): return login(request, next="/cobbler_web/replicate", expired=True) return HttpResponseRedirect("/cobbler_web/task_created") @@ -1147,7 +1147,7 @@ def generic_edit(request, what=None, obj_name=None, editmode="new"): inames.sort() html = t.render(RequestContext(request, { 'what': what, - #'fields': fields, + # 'fields': fields, 'sections': sections, 'subobject': child, 'editmode': editmode, diff --git a/web/urls.py b/web/urls.py index 38e15c4ef9..ccbc1ebafc 100644 --- a/web/urls.py +++ b/web/urls.py @@ -1,8 +1,8 @@ from django.conf.urls import patterns, include # Uncomment the next two lines to enable the admin: -#from django.contrib import admin -#admin.autodiscover() +# from django.contrib import admin +# admin.autodiscover() urlpatterns = patterns('', (r'^', include('cobbler_web.urls')),