Skip to content

Commit

Permalink
Removes duplicated code from configuration.py
Browse files Browse the repository at this point in the history
  • Loading branch information
remram44 committed Aug 1, 2014
1 parent 6199d7c commit 2c31d66
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions vistrails/core/configuration.py
Expand Up @@ -1440,22 +1440,6 @@ def get_vistrails_persistent_configuration():
else:
return None

def get_vistrails_configuration():
"""get_vistrails_configuration() -> ConfigurationObject or None
Returns the current configuration of the application. It returns None if
configuration was not found (when running as a bogus application
for example. This configuration is the one that is used just for the
current session and is not persistent. To make changes persistent,
use get_vistrails_persistent_configuration() instead.
"""
from vistrails.core.application import get_vistrails_application
app = get_vistrails_application()
if hasattr(app, 'temp_configuration'):
return app.temp_configuration
else:
return None

def get_vistrails_temp_configuration():
"""get_vistrails_temp_configuration() -> ConfigurationObject or None
Returns the temp configuration of the application. It returns None if
Expand All @@ -1472,6 +1456,8 @@ def get_vistrails_temp_configuration():
else:
return None

get_vistrails_configuration = get_vistrails_temp_configuration

import os
import tempfile
import unittest
Expand Down

0 comments on commit 2c31d66

Please sign in to comment.