Created
June 21, 2013 19:44
-
-
Save jrmoserbaltimore/5833803 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/env python | |
# Loads the configuration | |
from ConfigParser import ConfigParser | |
class Configuration: | |
"""Convenience class to load our configuration file""" | |
__default_config_file = '/etc/wcm/wcm.ini' | |
def __init__(self, config=None): | |
"""Constructor that reads configuration file""" | |
if not config: | |
config = self.__default__config__file |
This file contains hidden or 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
Traceback (most recent call last): | |
File "./wcm_ftpuseradd.py", line 58, in <module> | |
config = wcm.Configuration() | |
File "/var/www/x/wcm_tools/wcm/configuration.py", line 16, in __init__ | |
config = self.__default__config__file | |
AttributeError: Configuration instance has no attribute '_Configuration__default__config__file' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment