[prev in list] [next in list] [prev in thread] [next in thread]
List: klik-devel
Subject: [klik-devel] [klikclient commit] r1255 - in trunk/client/trunk: .
From: codesite-noreply () google ! com
Date: 2008-02-28 3:08:41
Message-ID: 00163646d13604472f3d1afcec3d902b () google ! com
[Download RAW message or body]
Author: razielmine
Date: Wed Feb 27 19:08:01 2008
New Revision: 1255
Modified:
trunk/client/trunk/install.py
trunk/client/trunk/klikclient/lib/klik/cmg.py
trunk/client/trunk/klikclient/lib/klik/integration.py
trunk/client/trunk/uninstall.py
Log:
basename > split[1]
Modified: trunk/client/trunk/install.py
==============================================================================
--- trunk/client/trunk/install.py (original)
+++ trunk/client/trunk/install.py Wed Feb 27 19:08:01 2008
@@ -106,7 +106,7 @@
if locales:
print " -",
for mo in locales:
- lang = os.path.splitext( os.path.split( mo )[1] )[0]
+ lang = os.path.splitext( os.path.basename( mo ) )[0]
path = os.path.join("/usr", "share", "locale", lang, "LC_MESSAGES")
print "["+lang+"]",
if not os.path.isdir( path ):
Modified: trunk/client/trunk/klikclient/lib/klik/cmg.py
==============================================================================
--- trunk/client/trunk/klikclient/lib/klik/cmg.py (original)
+++ trunk/client/trunk/klikclient/lib/klik/cmg.py Wed Feb 27 19:08:01 2008
@@ -376,7 +376,7 @@
name = recipe.name.capitalize()
terminal = recipe.require_terminal
else:
- name = os.path.splitext( os.path.split( self.path )[1] )[0].capitalize()
+ name = os.path.splitext( os.path.basename( self.path ) )[0].capitalize()
terminal = False
do.set("Name", name)
Modified: trunk/client/trunk/klikclient/lib/klik/integration.py
==============================================================================
--- trunk/client/trunk/klikclient/lib/klik/integration.py (original)
+++ trunk/client/trunk/klikclient/lib/klik/integration.py Wed Feb 27
19:08:01 2008
@@ -55,7 +55,7 @@
cmg_path = urllib.quote_plus( cmg_path )
else:
# `path_to_.desktop_files/cmg-*cmg_name_w/out_path...
- cmg_path = "*" + urllib.quote_plus( os.path.split(cmg_path)[1] )
+ cmg_path = "*" + urllib.quote_plus( os.path.basename(cmg_path) )
if check_version:
# ...cmg_name_w/_version.cmg-*`
cmg_path = os.path.splitext(cmg_path)[0]
@@ -94,7 +94,7 @@
def __get_path(self, menu_entry):
# Extracts the path of a CMG from the .desktop file name
- menu_entry = os.path.split( menu_entry )[1]
+ menu_entry = os.path.basename( menu_entry )
menu_entry = urllib.unquote_plus( menu_entry )
return menu_entry[4:menu_entry.rfind("/")]
Modified: trunk/client/trunk/uninstall.py
==============================================================================
--- trunk/client/trunk/uninstall.py (original)
+++ trunk/client/trunk/uninstall.py Wed Feb 27 19:08:01 2008
@@ -34,7 +34,7 @@
def remove_tree( path ):
try:
shutil.rmtree( path )
- os.removedirs( os.path.split( path )[0] ) # Remove directory if we
leave it empty
+ os.removedirs( os.path.dirname( path ) ) # Remove directory if we
leave it empty
return True
except OSError:
return False
@@ -44,7 +44,7 @@
def remove_file( path ):
try:
os.remove( path )
- os.removedirs( os.path.split( path )[0] ) # Remove directory if we
leave it empty
+ os.removedirs( os.path.dirname( path ) ) # Remove directory if we
leave it empty
return True
except OSError:
return False
_______________________________________________
klik-devel mailing list
klik-devel@kde.org
https://mail.kde.org/mailman/listinfo/klik-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic