servo: Merge #12971 - Change the separator used in rust path into os.path.join (from tp6vup54:master); r=Wafflespeanut
authortp6vup54 <genius091612@gmail.com>
Tue, 23 Aug 2016 00:39:55 -0500
changeset 339546 15b420ea45a518918e25759ba7f033a996b656ce
parent 339545 aeec11f93e77148c002fdd94352f7f3c2f35e0e3
child 339547 06dc2cc325db6c68cf36890f33c2c9264a392c71
push id31307
push usergszorc@mozilla.com
push dateSat, 04 Feb 2017 00:59:06 +0000
treeherdermozilla-central@94079d43835f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersWafflespeanut
servo: Merge #12971 - Change the separator used in rust path into os.path.join (from tp6vup54:master); r=Wafflespeanut <!-- Please describe your changes on the following line: --> Trying to solve #12961 and following the suggestion in it. Already run test-unit and no red appeared. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [x] These changes fix #12961 (github issue number if applicable). <!-- Either: --> - [x] These changes do not require tests because it's a cleanup of `mach` <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: 581e69f8ba1b949dcb5bfa215241d27e3460ee89
servo/python/servo/command_base.py
--- a/servo/python/servo/command_base.py
+++ b/servo/python/servo/command_base.py
@@ -281,19 +281,19 @@ class CommandBase(object):
                 self.context.sharedir, "rust", self.rust_path())
 
     def use_stable_rust(self):
         return self._use_stable_rust
 
     def rust_path(self):
         version = self.rust_version()
         if self._use_stable_rust:
-            return "%s/rustc-%s-%s" % (version, version, host_triple())
+            return os.path.join(version, "rustc-%s-%s" % (version, host_triple()))
         else:
-            return "%s/rustc-nightly-%s" % (version, host_triple())
+            return os.path.join(version, "rustc-nightly-%s" % (host_triple()))
 
     def rust_version(self):
         if self._rust_version is None or self._use_stable_rust != self._rust_version_is_stable:
             filename = path.join(self.context.topdir,
                                  "rust-stable-version" if self._use_stable_rust else "rust-nightly-date")
             with open(filename) as f:
                 self._rust_version = f.read().strip()
         return self._rust_version