splitlog 4.1.3__tar.gz → 4.1.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: splitlog
3
- Version: 4.1.3
3
+ Version: 4.1.4
4
4
  Summary: Utility to split aggregated logs from Apache Hadoop Yarn applications into a folder hierarchy
5
5
  License-Expression: MIT
6
6
  License-File: LICENSE
@@ -26,7 +26,7 @@ dependencies = [
26
26
  "python-dateutil (>=2.9.0,<3.0.0)",
27
27
  "pytz (>=2025.2)",
28
28
  ]
29
- version = "4.1.3"
29
+ version = "4.1.4"
30
30
 
31
31
 
32
32
  [project.urls]
@@ -123,7 +123,12 @@ class DefaultLocalFilesystemOutputFolder(OutputFolder):
123
123
 
124
124
  def create(self, path: Path) -> BinWriter:
125
125
  real_path = self._check_paths(path)
126
- return FileWrapper(open(real_path, "xb"))
126
+ f = open(real_path, "xb")
127
+ try:
128
+ return FileWrapper(f)
129
+ except Exception:
130
+ f.close()
131
+ raise
127
132
 
128
133
  @property
129
134
  def root(self) -> Path:
@@ -162,9 +167,10 @@ class LinuxLocalFilesystemOutputFolder(OutputFolder):
162
167
  return True
163
168
 
164
169
  def __init__(self, path: Path):
165
- assert (
166
- self.is_supported()
167
- ), "File system semantics are not supported by runtime environment"
170
+ if not self.is_supported():
171
+ raise RuntimeError(
172
+ "File system semantics are not supported by runtime environment"
173
+ )
168
174
  self._path: Path = path.resolve()
169
175
  self._dir_fd: t.Union[int, None] = None
170
176
 
File without changes
File without changes
File without changes
File without changes