Skip to content

Commit 1f5a18d

Browse files
committed
patch running black
1 parent ed98d45 commit 1f5a18d

File tree

1 file changed

+26
-24
lines changed

1 file changed

+26
-24
lines changed

volatility3/framework/layers/cloudstorage.py

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@
88

99
try:
1010
import s3fs
11+
1112
HAS_S3FS = True
1213
except ImportError:
1314
HAS_S3FS = False
1415

1516
try:
1617
import gcsfs
18+
1719
HAS_GCSFS = True
1820
except ImportError:
1921
HAS_GCSFS = False
@@ -26,30 +28,30 @@
2628
if HAS_S3FS:
2729

2830
class S3FileSystemHandler(resources.VolatilityHandler):
29-
30-
@classmethod
31-
def non_cached_schemes(cls) -> List[str]:
32-
return ["s3"]
33-
34-
@staticmethod
35-
def default_open(req: urllib.request.Request) -> Optional[Any]:
36-
"""Handles the request if it's the s3 scheme."""
37-
if req.type == "s3":
38-
object_uri = "://".join(req.full_url.split("://")[1:])
39-
return s3fs.S3FileSystem().open(object_uri)
40-
return None
31+
@classmethod
32+
def non_cached_schemes(cls) -> List[str]:
33+
return ["s3"]
34+
35+
@staticmethod
36+
def default_open(req: urllib.request.Request) -> Optional[Any]:
37+
"""Handles the request if it's the s3 scheme."""
38+
if req.type == "s3":
39+
object_uri = "://".join(req.full_url.split("://")[1:])
40+
return s3fs.S3FileSystem().open(object_uri)
41+
return None
42+
4143

4244
if HAS_GCSFS:
43-
45+
4446
class GSFileSystemHandler(resources.VolatilityHandler):
45-
@classmethod
46-
def non_cached_schemes(cls) -> List[str]:
47-
return ["gs"]
48-
49-
@staticmethod
50-
def default_open(req: urllib.request.Request) -> Optional[Any]:
51-
"""Handles the request if it's the gs scheme."""
52-
if req.type == "gs":
53-
object_uri = "://".join(req.full_url.split("://")[1:])
54-
return gcsfs.GCSFileSystem().open(object_uri)
55-
return None
47+
@classmethod
48+
def non_cached_schemes(cls) -> List[str]:
49+
return ["gs"]
50+
51+
@staticmethod
52+
def default_open(req: urllib.request.Request) -> Optional[Any]:
53+
"""Handles the request if it's the gs scheme."""
54+
if req.type == "gs":
55+
object_uri = "://".join(req.full_url.split("://")[1:])
56+
return gcsfs.GCSFileSystem().open(object_uri)
57+
return None

0 commit comments

Comments
 (0)