Skip to content

Commit 1fd1fb5

Browse files
Apply suggestions from code review
Co-authored-by: Ashley Sommer <[email protected]>
1 parent 81d0f99 commit 1fd1fb5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

rdflib/graph.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -992,10 +992,11 @@ def serialize(
992992
stream = os.fdopen(fd, "wb")
993993
serializer.serialize(stream, base=base, encoding=encoding, **args)
994994
stream.close()
995+
dest = path if scheme == "file" else location
995996
if hasattr(shutil, "move"):
996-
shutil.move(name, location)
997+
shutil.move(name, dest)
997998
else:
998-
shutil.copy(name, location)
999+
shutil.copy(name, dest)
9991000
os.remove(name)
10001001

10011002
def parse(

0 commit comments

Comments
 (0)