Skip to content

Commit

Permalink
Untangle logic a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
untitaker committed Mar 5, 2015
1 parent 0748e2d commit 94a3968
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions flask/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -802,11 +802,10 @@ def _set_static_folder(self, value):
del _get_static_folder, _set_static_folder

def _get_static_url_path(self):
if self._static_url_path is None:
if self.static_folder is None:
return None
if self._static_url_path is not None:
return self._static_url_path
if self.static_folder is not None:
return '/' + os.path.basename(self.static_folder)
return self._static_url_path
def _set_static_url_path(self, value):
self._static_url_path = value
static_url_path = property(_get_static_url_path, _set_static_url_path)
Expand Down

0 comments on commit 94a3968

Please sign in to comment.