Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion steam/client/cdn.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@
:return: list of lines
:rtype: :class:`list` [:class:`bytes`]
"""
return [line for line in self]

Check warning on line 398 in steam/client/cdn.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Replace this comprehension with passing the iterable to the collection constructor call

See more on https://sonarcloud.io/project/issues?id=ValvePython_steam&issues=AaCA9DkNI53IFvo24LuR&open=AaCA9DkNI53IFvo24LuR&pullRequest=494


class CDNDepotManifest(DepotManifest):
Expand All @@ -422,7 +422,7 @@
"depot_id=" + str(self.depot_id),
"gid=" + str(self.gid),
"creation_time=" + repr(
datetime.utcfromtimestamp(self.metadata.creation_time).isoformat().replace('T', ' ')

Check failure on line 425 in steam/client/cdn.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Don't use `datetime.datetime.utcfromtimestamp` to create this datetime object.

See more on https://sonarcloud.io/project/issues?id=ValvePython_steam&issues=AaCA9DkNI53IFvo24LuS&open=AaCA9DkNI53IFvo24LuS&pullRequest=494
),
])

Expand Down Expand Up @@ -496,8 +496,8 @@
self._LOG.debug("No steam licenses found on SteamClient instance")
return

packages = list(map(lambda l: {'packageid': l.package_id, 'access_token': l.access_token},
itervalues(self.steam.licenses)))

Check warning on line 500 in steam/client/cdn.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Replace this map call with a comprehension.

See more on https://sonarcloud.io/project/issues?id=ValvePython_steam&issues=AaCA9DkNI53IFvo24LuT&open=AaCA9DkNI53IFvo24LuT&pullRequest=494

for package_id, info in iteritems(self.steam.get_product_info(packages=packages)['packages']):
self.licensed_app_ids.update(info['appids'].values())
Expand Down Expand Up @@ -715,7 +715,7 @@

if resp.eresult == EResult.OK:
self._LOG.debug("Unlocked following beta branches: %s",
', '.join(map(lambda x: x.betaname.lower(), resp.betapasswords)))

Check warning on line 718 in steam/client/cdn.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Replace this map call with a comprehension.

See more on https://sonarcloud.io/project/issues?id=ValvePython_steam&issues=AaCA9DkNI53IFvo24LuU&open=AaCA9DkNI53IFvo24LuU&pullRequest=494
for entry in resp.betapasswords:
self.beta_passwords[(app_id, entry.betaname.lower())] = unhexlify(entry.betapassword)
else:
Expand Down Expand Up @@ -780,12 +780,17 @@
def async_fetch_manifest(
app_id, depot_id, manifest_gid, decrypt, depot_name, branch_name, branch_pass
):

if isinstance(manifest_gid, dict):
manifest_gid = manifest_gid['gid']
try:
manifest_code = self.get_manifest_request_code(
app_id, depot_id, int(manifest_gid), branch_name, branch_pass
app_id, depot_id, int(manifest_gid), branch_name, branch_pass
)
except SteamError as exc:
return ManifestError("Failed to acquire manifest code", app_id, depot_id, manifest_gid, exc)



try:
manifest = self.get_manifest(
Expand Down