Example #1
0
 def auto_clean(self):
     """
     Similar to `apt-get autoclean`
     """
     try:
         orig_out = sys.stdout
         sys.stdout = open(self.app.config.get("log.logging", "file"), encoding="utf-8", mode="a")
         apt_get.autoclean("-y")
         sys.stdout = orig_out
     except ErrorReturnCode as e:
         Log.debug(self, "{0}".format(e))
         Log.error(self, "Unable to apt-get autoclean")
Example #2
0
 def auto_clean(self):
     """
     Similar to `apt-get autoclean`
     """
     try:
         orig_out = sys.stdout
         sys.stdout = open(self.app.config.get('log.logging', 'file'),
                           encoding='utf-8', mode='a')
         apt_get.autoclean("-y")
         sys.stdout = orig_out
     except ErrorReturnCode as e:
         Log.debug(self, "{0}".format(e))
         Log.error(self, "Unable to apt-get autoclean")