Example #1
0
    def postOptions(self):
        """used to decide what we need to do now. i am called by parseOptions.
        """
        if self.running: return
        #if we are given external configuration use it overrides commandline
        if self.CONFIGFILE and os.path.exists(self.CONFIGFILE):
            from ConfigParser import ConfigParser as _cf
            _config = _cf()
            _config.read(self.CONFIGFILE)
            for key in self.keys():
                if  any([ i for i in self.optFlags if key in i]):
                    continue #things like stop and nodaemon are not meant for config
                try: #attempt to update the keys
                    t = type(self[key])
                    self[key] = t(_config.get('droned', key))
                except: pass

        self.sanitize_droned(kill=self['stop'])
        if self['stop']: sys.exit(0)
Example #2
0
    def postOptions(self):
        """used to decide what we need to do now. i am called by parseOptions.
        """
        if self.running: return
        #if we are given external configuration use it overrides commandline
        if self.CONFIGFILE and os.path.exists(self.CONFIGFILE):
            from ConfigParser import ConfigParser as _cf
            _config = _cf()
            _config.read(self.CONFIGFILE)
            for key in self.keys():
                if any([i for i in self.optFlags if key in i]):
                    continue  #things like stop and nodaemon are not meant for config
                try:  #attempt to update the keys
                    t = type(self[key])
                    self[key] = t(_config.get('droned', key))
                except:
                    pass

        self.sanitize_droned(kill=self['stop'])
        if self['stop']: sys.exit(0)
Example #3
0
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
'''
__doc__ = copyright_notice
"""

_f = open(os.path.join(WHEREAMI,'copyright.py'),'w')
_f.write(copyright_module)
_f.close()

#FIXME this is a hack but i need to get this done
if os.path.exists('setup.cfg'):
    from ConfigParser import ConfigParser as _cf

    _config = _cf()
    _config.read('setup.cfg')
    
    _blaster = {
        'executable': sys.executable,
        'script': os.path.join(
                _config.get('install','install-lib'),
                'droneclient.py'
            ),
    }

    _droned = {
        'executable': sys.executable,
        'script': os.path.join(
                _config.get('install','install-lib'),
                'droned-daemon.py'
Example #4
0
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
'''
__doc__ = copyright_notice
"""

_f = open(os.path.join(WHEREAMI, 'copyright.py'), 'w')
_f.write(copyright_module)
_f.close()

#FIXME this is a hack but i need to get this done
if os.path.exists('setup.cfg'):
    from ConfigParser import ConfigParser as _cf

    _config = _cf()
    _config.read('setup.cfg')

    _blaster = {
        'executable':
        sys.executable,
        'script':
        os.path.join(_config.get('install', 'install-lib'), 'droneclient.py'),
    }

    _droned = {
        'executable':
        sys.executable,
        'script':
        os.path.join(_config.get('install', 'install-lib'),
                     'droned-daemon.py'),