aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZbynek Winkler <zbynek.winkler@gmail.com>2016-04-14 21:49:09 +0200
committerZbynek Winkler <zbynek.winkler@gmail.com>2016-04-17 17:37:29 +0200
commitb6dc34862a81efc57295d61575aec6dd9c04e3a6 (patch)
tree010c6e98fafdea491fe4b41ae0f6bebd16ec1548
parenta87fa103b89213b9306be35dd26980aed22207e0 (diff)
downloadservo-b6dc34862a81efc57295d61575aec6dd9c04e3a6.tar.gz
servo-b6dc34862a81efc57295d61575aec6dd9c04e3a6.zip
Use os.path.basename instead of split('/')[-1]
Fixes #10596.
-rw-r--r--components/script/dom/bindings/codegen/Configuration.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/components/script/dom/bindings/codegen/Configuration.py b/components/script/dom/bindings/codegen/Configuration.py
index c634665c410..99727f8acc0 100644
--- a/components/script/dom/bindings/codegen/Configuration.py
+++ b/components/script/dom/bindings/codegen/Configuration.py
@@ -2,6 +2,8 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+import os
+
from WebIDL import IDLExternalInterface, IDLInterface, WebIDLError
@@ -360,7 +362,7 @@ class Descriptor(DescriptorProvider):
# Some utility methods
def getModuleFromObject(object):
- return object.location.filename().split('/')[-1].split('.webidl')[0] + 'Binding'
+ return os.path.basename(object.location.filename()).split('.webidl')[0] + 'Binding'
def getTypesFromDescriptor(descriptor):