diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-02-08 15:23:22 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-02-08 15:23:22 +0400 |
commit | 08326778c5c24bf9d0592264dabfea094057b471 (patch) | |
tree | d31ddd48592e1a9540387d30b15a6637c8fc8d22 /release | |
parent | 560c022af95bb6cad80739d12c861c4b9e8924d6 (diff) |
use sys.platform for checking the OS.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_userpref.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index dad729077e0..2a2db40310c 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -19,7 +19,6 @@ # <pep8 compliant> import bpy from bpy.types import Header, Menu, Panel -import os def ui_style_items(col, context): @@ -183,6 +182,7 @@ class USERPREF_PT_interface(Panel): return (userpref.active_section == 'INTERFACE') def draw(self, context): + import sys layout = self.layout userpref = context.user_preferences @@ -268,7 +268,7 @@ class USERPREF_PT_interface(Panel): col.prop(view, "show_splash") - if os.name == "nt": + if sys.platform[:3] == "win": col.prop(view, "use_quit_dialog") @@ -1077,6 +1077,8 @@ class USERPREF_PT_addons(Panel): @staticmethod def is_user_addon(mod, user_addon_paths): + import os + if not user_addon_paths: for path in (bpy.utils.script_path_user(), bpy.utils.script_path_pref()): @@ -1099,6 +1101,7 @@ class USERPREF_PT_addons(Panel): box.label(l) def draw(self, context): + import os import addon_utils layout = self.layout |