Created
October 23, 2012 18:37
-
-
Save chadwhitacre/3940639 to your computer and use it in GitHub Desktop.
diff -ru master-02899 master-a805
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -ru master-02899/.git/HEAD master-a805/.git/HEAD | |
--- master-02899/.git/HEAD 2012-10-23 14:35:41.000000000 -0400 | |
+++ master-a805/.git/HEAD 2012-10-23 14:35:14.000000000 -0400 | |
@@ -1 +1 @@ | |
-02899c45e4eef039318c641bc70e477478b23740 | |
+a805db2e43d8da3017b2da4c2e0db981b10c748c | |
Binary files master-02899/.git/index and master-a805/.git/index differ | |
diff -ru master-02899/.git/logs/HEAD master-a805/.git/logs/HEAD | |
--- master-02899/.git/logs/HEAD 2012-10-23 14:35:41.000000000 -0400 | |
+++ master-a805/.git/logs/HEAD 2012-10-23 14:35:14.000000000 -0400 | |
@@ -1 +1,2 @@ | |
-0000000000000000000000000000000000000000 02899c45e4eef039318c641bc70e477478b23740 Chad Whitacre <[email protected]> 1351017341 -0400 clone: from /Users/whit537/personal/aspen/master | |
+0000000000000000000000000000000000000000 02899c45e4eef039318c641bc70e477478b23740 Chad Whitacre <[email protected]> 1351017302 -0400 clone: from /Users/whit537/personal/aspen/master | |
+02899c45e4eef039318c641bc70e477478b23740 a805db2e43d8da3017b2da4c2e0db981b10c748c Chad Whitacre <[email protected]> 1351017314 -0400 checkout: moving from 02899c45e4eef039318c641bc70e477478b23740 to a805 | |
diff -ru master-02899/aspen/configuration/__init__.py master-a805/aspen/configuration/__init__.py | |
--- master-02899/aspen/configuration/__init__.py 2012-10-23 14:35:41.000000000 -0400 | |
+++ master-a805/aspen/configuration/__init__.py 2012-10-23 14:35:14.000000000 -0400 | |
@@ -202,20 +202,9 @@ | |
# Set some attributes. | |
# ==================== | |
- # LOGGING_THRESHOLD | |
- # ----------------- | |
- # This is initially set to -1 and not 0 so that we can tell if the user | |
- # changed it programmatically directly before we got here. I do this in | |
- # the testing module, that's really what this is about. | |
- if aspen.logging.LOGGING_THRESHOLD == -1: | |
- aspen.logging.LOGGING_THRESHOLD = self.logging_threshold | |
- # Now that we know the user's desires, we can log appropriately. | |
- aspen.log_dammit(os.linesep.join(msgs)) | |
- # www_root | |
- if self.www_root is None: | |
+ def safe_getcwd(errorstr): | |
try: | |
- | |
# If the working directory no longer exists, then the following | |
# will raise OSError: [Errno 2] No such file or directory. I | |
# swear I've seen this under supervisor, though I don't have | |
@@ -223,17 +212,23 @@ | |
# www_root explicitly, or you can use supervisor's cwd | |
# facility. | |
- self.www_root = os.getcwd() | |
+ return os.getcwd() | |
except OSError, err: | |
if err.errno != errno.ENOENT: | |
raise | |
- raise ConfigurationError("Could not get a current working " | |
- "directory. You can specify " | |
- "ASPEN_WWW_ROOT in the environment, " | |
- "or --www_root on the command line.") | |
+ raise ConfigurationError(errorstr) | |
- self.www_root = os.path.realpath(self.www_root) | |
- os.chdir(self.www_root) | |
+ | |
+ | |
+ # LOGGING_THRESHOLD | |
+ # ----------------- | |
+ # This is initially set to -1 and not 0 so that we can tell if the user | |
+ # changed it programmatically directly before we got here. I do this in | |
+ # the testing module, that's really what this is about. | |
+ if aspen.logging.LOGGING_THRESHOLD == -1: | |
+ aspen.logging.LOGGING_THRESHOLD = self.logging_threshold | |
+ # Now that we know the user's desires, we can log appropriately. | |
+ aspen.log_dammit(os.linesep.join(msgs)) | |
# project root | |
if self.project_root is None: | |
@@ -245,9 +240,12 @@ | |
if not os.path.isabs(self.project_root): | |
aspen.log_dammit("project_root is relative: '%s'." | |
% self.project_root) | |
- self.project_root = os.path.join( self.www_root | |
- , self.project_root | |
- ) | |
+ cwd = safe_getcwd("Could not get a current working " | |
+ "directory. You can specify " | |
+ "ASPEN_PROJECT_ROOT in the environment, " | |
+ "or --project_root on the command line.") | |
+ self.project_root = os.path.join(cwd, self.project_root) | |
+ | |
self.project_root = os.path.realpath(self.project_root) | |
aspen.log_dammit("project_root set to %s." % self.project_root) | |
@@ -264,6 +262,16 @@ | |
# PYTHONPATH | |
sys.path.insert(0, self.project_root) | |
+ # www_root | |
+ if self.www_root is None: | |
+ self.www_root = safe_getcwd("Could not get a current working " | |
+ "directory. You can specify " | |
+ "ASPEN_WWW_ROOT in the environment, " | |
+ "or --www_root on the command line.") | |
+ | |
+ self.www_root = os.path.realpath(self.www_root) | |
+ os.chdir(self.www_root) | |
+ | |
# renderers | |
self.renderer_factories = {} | |
for name in aspen.RENDERERS: | |
diff -ru master-02899/aspen.egg-info/PKG-INFO master-a805/aspen.egg-info/PKG-INFO | |
--- master-02899/aspen.egg-info/PKG-INFO 2012-10-23 14:35:54.000000000 -0400 | |
+++ master-a805/aspen.egg-info/PKG-INFO 2012-10-23 14:35:24.000000000 -0400 | |
@@ -1,6 +1,6 @@ | |
Metadata-Version: 1.0 | |
Name: aspen | |
-Version: 0.18.41- | |
+Version: 0.18.42 | |
Summary: Aspen is a Python web framework. Simplates are the main attraction. | |
Home-page: http://aspen.io/ | |
Author: Chad Whitacre | |
diff -ru master-02899/version.txt master-a805/version.txt | |
--- master-02899/version.txt 2012-10-23 14:35:41.000000000 -0400 | |
+++ master-a805/version.txt 2012-10-23 14:35:14.000000000 -0400 | |
@@ -1 +1 @@ | |
-0.18.41+ | |
\ No newline at end of file | |
+0.18.42 | |
\ No newline at end of file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment