Skip to content

Commit 9c3cf06

Browse files
committed
inherit from object
1 parent 4f11a39 commit 9c3cf06

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/bootstrap/bootstrap.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ def stage0_data(rust_root):
131131
def format_build_time(duration):
132132
return str(datetime.timedelta(seconds=int(duration)))
133133

134-
class RustBuild:
134+
135+
class RustBuild(object):
135136
def download_stage0(self):
136137
cache_dst = os.path.join(self.build_dir, "cache")
137138
rustc_cache = os.path.join(cache_dst, self.stage0_rustc_date())
@@ -142,7 +143,7 @@ def download_stage0(self):
142143
os.makedirs(cargo_cache)
143144

144145
if self.rustc().startswith(self.bin_root()) and \
145-
(not os.path.exists(self.rustc()) or self.rustc_out_of_date()):
146+
(not os.path.exists(self.rustc()) or self.rustc_out_of_date()):
146147
if os.path.exists(self.bin_root()):
147148
shutil.rmtree(self.bin_root())
148149
channel = self.stage0_rustc_channel()
@@ -165,7 +166,7 @@ def download_stage0(self):
165166
f.write(self.stage0_rustc_date())
166167

167168
if self.cargo().startswith(self.bin_root()) and \
168-
(not os.path.exists(self.cargo()) or self.cargo_out_of_date()):
169+
(not os.path.exists(self.cargo()) or self.cargo_out_of_date()):
169170
channel = self.stage0_cargo_channel()
170171
filename = "cargo-{}-{}.tar.gz".format(channel, self.build)
171172
url = "https://static.rust-lang.org/cargo-dist/" + self.stage0_cargo_date()
@@ -238,8 +239,8 @@ def rustc(self):
238239

239240
def get_string(self, line):
240241
start = line.find('"')
241-
end = start + 1 + line[start+1:].find('"')
242-
return line[start+1:end]
242+
end = start + 1 + line[start + 1:].find('"')
243+
return line[start + 1:end]
243244

244245
def exe_suffix(self):
245246
if sys.platform == 'win32':

0 commit comments

Comments
 (0)