IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 3, 2019, 12:46:09 PM (7 years ago)
Author:
fairlamb
Message:

separated out erros into it's own class and moved files to be under one module...not sure if history saved

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ipp-132_automate_jira_conf_backups/backups/backup_atlassian_applications.py

    r40897 r40898  
    99import sys
    1010
    11 # note that this replies on sym link to the 'trunk/tools/utils/python' folder existing
    12 # in this directory with the name 'utils'. This is not an elegant solution, but
    13 # a restructure would be needed
    14 # Ideally, the utils should be added to the path.
    15 import subprocess_utils as sub_utils
    16 
     11import backups.utils.subprocess_utils as sub_utils
     12from backups.utils.errors import ConfigError, SubprocessError
    1713
    1814DEFAULT_CONFIG_FILE = path.join(path.dirname(__file__), 'atlassian_backups.config')
    19 
    20 
    21 class ConfigError(Exception):
    22     """Error in loading the config file"""
    23 
    24     def __init__(self, config_item, message):
    25         self.config_item = config_item
    26         self.message = message
    2715
    2816
     
    284272            decoded_stderr = stde.decode()
    285273            if decoded_stderr.casefold().find('error'.casefold()) > -1:
    286                 raise sub_utils.SubprocessError()
     274                raise SubprocessError()
    287275
    288276        # move the dump file to the correct locations
Note: See TracChangeset for help on using the changeset viewer.