Apache/2.4.7 (Ubuntu) Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) safemode : OFF MySQL: ON | Perl: ON | cURL: OFF | WGet: ON > / usr / lib / python3 / dist-packages / DistUpgrade / | server ip : 104.21.89.46 your ip : 108.162.241.113 H O M E |
Filename | /usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherSelf.py |
Size | 1.23 kb |
Permission | rw-r--r-- |
Owner | root : root |
Create time | 27-Apr-2025 09:55 |
Last modified | 25-Feb-2014 07:14 |
Last accessed | 06-Jul-2025 10:35 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
from __future__ import absolute_import
import logging
import shutil
from .DistUpgradeFetcherCore import DistUpgradeFetcherCore
class DistUpgradeFetcherSelf(DistUpgradeFetcherCore):
def __init__(self, new_dist, progress, options, view):
DistUpgradeFetcherCore.__init__(self,new_dist,progress)
self.view = view
# user chose to use the network, otherwise it would not be
# possible to download self
self.run_options += ["--with-network"]
# make sure to run self with proper options
if options.cdromPath is not None:
self.run_options += ["--cdrom=%s" % options.cdromPath]
if options.frontend is not None:
self.run_options += ["--frontend=%s" % options.frontend]
def error(self, summary, message):
return self.view.error(summary, message)
def runDistUpgrader(self):
" overwrite to ensure that the log is copied "
# copy log so it isn't overwritten
logging.info("runDistUpgrader() called, re-exec self")
logging.shutdown()
shutil.copy("/var/log/dist-upgrade/main.log",
"/var/log/dist-upgrade/main_update_self.log")
# re-exec self
DistUpgradeFetcherCore.runDistUpgrader(self)
import logging
import shutil
from .DistUpgradeFetcherCore import DistUpgradeFetcherCore
class DistUpgradeFetcherSelf(DistUpgradeFetcherCore):
def __init__(self, new_dist, progress, options, view):
DistUpgradeFetcherCore.__init__(self,new_dist,progress)
self.view = view
# user chose to use the network, otherwise it would not be
# possible to download self
self.run_options += ["--with-network"]
# make sure to run self with proper options
if options.cdromPath is not None:
self.run_options += ["--cdrom=%s" % options.cdromPath]
if options.frontend is not None:
self.run_options += ["--frontend=%s" % options.frontend]
def error(self, summary, message):
return self.view.error(summary, message)
def runDistUpgrader(self):
" overwrite to ensure that the log is copied "
# copy log so it isn't overwritten
logging.info("runDistUpgrader() called, re-exec self")
logging.shutdown()
shutil.copy("/var/log/dist-upgrade/main.log",
"/var/log/dist-upgrade/main_update_self.log")
# re-exec self
DistUpgradeFetcherCore.runDistUpgrader(self)