Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing an issue with themes not deleting if there's an error deleting…

… the theme directory
  • Loading branch information...
commit 08f878e6bf4856b6513bada9ccbac4f4a36b77aa 1 parent a255285
Mark Ransom authored
Showing with 7 additions and 4 deletions.
  1. +2 −2 cms_themes/__init__.py
  2. +4 −1 cms_themes/models.py
  3. +1 −1  setup.py
View
4 cms_themes/__init__.py
@@ -1,5 +1,5 @@
-VERSION = (1,0,3)
-__version__ = "1.0.3"
+VERSION = (1,0,5)
+__version__ = "1.0.5"
import random
import os
View
5 cms_themes/models.py
@@ -31,7 +31,10 @@ def extract_theme(sender, **kwargs):
def update_themes(sender, **kwargs):
instance = kwargs['instance']
- shutil.rmtree(os.path.join(settings.THEMES_DIR, instance.name))
+ try:
+ shutil.rmtree(os.path.join(settings.THEMES_DIR, instance.name))
+ except OSError:
+ pass
set_themes()
pre_save.connect(extract_theme, sender=Theme)
View
2  setup.py
@@ -23,7 +23,7 @@
include_package_data=True,
zip_safe=False,
classifiers = [
- 'Development Status :: 5 - Production',
+ 'Development Status :: 4 - Beta',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
Please sign in to comment.
Something went wrong with that request. Please try again.