Univention Bugzilla – Attachment 5502 Details for
Bug 32817
Traceback: script not executable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Catch OSError
32817_uss-script-tb.diff (text/plain), 2.22 KB, created by
Philipp Hahn
on 2013-10-08 11:19 CEST
(
hide
)
Description:
Catch OSError
Filename:
MIME Type:
Creator:
Philipp Hahn
Created:
2013-10-08 11:19 CEST
Size:
2.22 KB
patch
obsolete
>From d779689e7c5710bb276e82113352d6d8ac15f1b8 Mon Sep 17 00:00:00 2001 >Message-Id: <d779689e7c5710bb276e82113352d6d8ac15f1b8.1381223955.git.hahn@univention.de> >From: Philipp Hahn <hahn@univention.de> >Date: Tue, 8 Oct 2013 10:58:49 +0200 >Subject: [PATCH] Bug #32817: USS: Catch exception on script execution >Organization: Univention GmbH, Bremen, Germany > >Catch OSError when executing the scripts, since otherwise the browser >get stuck. >--- > .../base/univention-system-setup/umc/python/setup/util.py | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > >diff --git a/branches/ucs-3.2/ucs-3.2-0/base/univention-system-setup/umc/python/setup/util.py b/branches/ucs-3.2/ucs-3.2-0/base/univention-system-setup/umc/python/setup/util.py >index 0fcdee0..cc7fa45 100644 >--- a/branches/ucs-3.2/ucs-3.2-0/base/univention-system-setup/umc/python/setup/util.py >+++ b/branches/ucs-3.2/ucs-3.2-0/base/univention-system-setup/umc/python/setup/util.py >@@ -133,7 +133,7 @@ def load_values(): > def _xkeymap(keymap): > '''Determine the x-keymap which belongs to 'keymap' by > parsing /lib/univention-installer/locale/all-kmaps''' >- >+ > xkeymap = {'layout' : '', 'variant' : ''} > fp = open('/lib/univention-installer/locale/all-kmaps', 'r') > for line in fp: >@@ -368,9 +368,13 @@ def run_scripts( progressParser, restartServer = False ): > subprocess.call( CMD_DISABLE_EXEC, stdout = f, stderr = f ) > > for scriptpath in sorted_files_in_subdirs( PATH_SETUP_SCRIPTS ): >- # launch script >- MODULE.info('Running script %s\n' % scriptpath) >+ # launch script >+ try: > p = subprocess.Popen( scriptpath, stdout = subprocess.PIPE, stderr = subprocess.STDOUT ) >+ MODULE.info("Running script '%s': pid=%d" % (scriptpath, p.pid)) >+ except OSError, ex: >+ MODULE.info("Failed to run '%s': %s" % (scriptpath, ex)) >+ else: > for line in p.stdout: > progressParser.parse( line ) > f.write( line ) >@@ -579,7 +583,7 @@ def get_components(role=None): > > # reload for correct locale > imp.reload(package_list) >- pkglist = [ jpackage for icategory in package_list.PackageList >+ pkglist = [ jpackage for icategory in package_list.PackageList > for jpackage in icategory['Packages'] > if 'all' in jpackage['Possible'] or role in jpackage['Possible'] ] > >-- >1.7.10.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 32817
: 5502