diff --git a/hyde/engine.py b/hyde/engine.py index 2cf3c76..999e068 100644 --- a/hyde/engine.py +++ b/hyde/engine.py @@ -52,7 +52,8 @@ class Engine(Application): sitepath = Folder(Folder(args.sitepath).fully_expanded_path) if sitepath.exists and not args.overwrite: raise HydeException( - "The given site path[%s] is not empty" % sitepath) + "The given site path [%s] already exists." + " Use -f to overwrite." % sitepath) layout = Layout.find_layout(args.layout) logger.info( "Creating site at [%s] with layout [%s]" % (sitepath, layout)) diff --git a/hyde/ext/plugins/folders.py b/hyde/ext/plugins/folders.py index 726645c..40bd6f0 100644 --- a/hyde/ext/plugins/folders.py +++ b/hyde/ext/plugins/folders.py @@ -36,7 +36,7 @@ class FlattenerPlugin(Plugin): for resource in node.walk_resources(): target_path = target.child(resource.name) self.logger.debug( - 'Flattening resource path[%s] to [%s]' % + 'Flattening resource path [%s] to [%s]' % (resource, target_path)) resource.relative_deploy_path = target_path diff --git a/hyde/generator.py b/hyde/generator.py index 1feca77..5b2acfc 100644 --- a/hyde/generator.py +++ b/hyde/generator.py @@ -307,7 +307,7 @@ class Generator(object): context) except Exception: logger.error("Error occurred when" - " processing template:[%s]" % resource) + " processing template: [%s]" % resource) raise else: text = resource.source_file.read_all() diff --git a/hyde/plugin.py b/hyde/plugin.py index 6369eca..2a24055 100644 --- a/hyde/plugin.py +++ b/hyde/plugin.py @@ -299,7 +299,7 @@ class CLTransformer(Plugin): """ try: self.logger.debug( - "Calling executable[%s] with arguments %s" % + "Calling executable [%s] with arguments %s" % (args[0], str(args[1:]))) subprocess.check_call(args) except subprocess.CalledProcessError, error: diff --git a/hyde/server.py b/hyde/server.py index 961ede8..6a07793 100644 --- a/hyde/server.py +++ b/hyde/server.py @@ -34,7 +34,7 @@ class HydeRequestHandler(SimpleHTTPRequestHandler): and serve. """ self.server.request_time = datetime.now() - logger.info("Processing request:[%s]" % self.path) + logger.info("Processing request: [%s]" % self.path) result = urlparse.urlparse(self.path) query = urlparse.parse_qs(result.query) if 'refresh' in query or result.query=='refresh': @@ -45,7 +45,7 @@ class HydeRequestHandler(SimpleHTTPRequestHandler): parts[4] = urllib.urlencode(query) parts = tuple(parts) new_url = urlparse.urlunparse(parts) - logger.info('Redirecting...[%s]' % new_url) + logger.info('Redirecting... [%s]' % new_url) self.redirect(new_url) else: SimpleHTTPRequestHandler.do_GET(self) @@ -59,7 +59,7 @@ class HydeRequestHandler(SimpleHTTPRequestHandler): path = SimpleHTTPRequestHandler.translate_path(self, path) site = self.server.site result = urlparse.urlparse(self.path) - logger.debug("Trying to load file based on request:[%s]" % result.path) + logger.debug("Trying to load file based on request: [%s]" % result.path) path = result.path.lstrip('/') res = None if path.strip() == "" or File(path).kind.strip() == "": @@ -72,7 +72,7 @@ class HydeRequestHandler(SimpleHTTPRequestHandler): res = site.content.resource_from_relative_deploy_path(path) if not res: - logger.error("Cannot load file:[%s]" % path) + logger.error("Cannot load file: [%s]" % path) return site.config.deploy_root_path.child(path) else: @@ -95,7 +95,7 @@ class HydeRequestHandler(SimpleHTTPRequestHandler): message = "Requested resource not found" if not res: logger.error( - "Cannot find the 404 template[%s]." + "Cannot find the 404 template [%s]." % site.config.not_found) else: f404 = File(self.translate_path(site.config.not_found)) diff --git a/hyde/site.py b/hyde/site.py index f2b820c..5d83cf9 100644 --- a/hyde/site.py +++ b/hyde/site.py @@ -323,7 +323,7 @@ class RootNode(Node): """ if not self.source_folder.exists: - raise HydeException("The given source folder[%s]" + raise HydeException("The given source folder [%s]" " does not exist" % self.source_folder) with self.source_folder.walker as walker: