Merge pull request #222557 from alyssais/nixos-test-driver-screenshot-charset
nixos/test-driver: accept non-\w* filenames
This commit is contained in:
commit
09ad6a7235
1 changed files with 4 additions and 3 deletions
|
@ -737,9 +737,10 @@ class Machine:
|
|||
self.connected = True
|
||||
|
||||
def screenshot(self, filename: str) -> None:
|
||||
word_pattern = re.compile(r"^\w+$")
|
||||
if word_pattern.match(filename):
|
||||
filename = os.path.join(self.out_dir, f"{filename}.png")
|
||||
if "." not in filename:
|
||||
filename += ".png"
|
||||
if "/" not in filename:
|
||||
filename = os.path.join(self.out_dir, filename)
|
||||
tmp = f"{filename}.ppm"
|
||||
|
||||
with self.nested(
|
||||
|
|
Loading…
Reference in a new issue