Skip to content

Commit

Permalink
fix variable typo, command in os method
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjonesBSU committed Jul 18, 2024
1 parent ef41d59 commit e3f35a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mbuild/lattice.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ def _check_for_overlap(self, lattice_points):
raise ValueError(
"Overlapping lattice points: Lattice points overlap when "
f"the unit cell is expanded to {key}. This is an incorrect "
f"perfect lattice. The offending points are: {value}"
f"perfect lattice. The offending points are: {val}"
)
return lattice_points

Expand Down
3 changes: 2 additions & 1 deletion mbuild/packing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1179,7 +1179,8 @@ def _run_packmol(input_text, filled_xyz, temp_file):
os.remove(packmol_inp.name)

if temp_file is not None:
os.system(f"cp {filled_xyz.name} {os.path.join(temp_file)}")
command = f"cp {filled_xyz.name} {os.path.join(temp_file)}"

Check warning

Code scanning / CodeQL

Unsafe shell command constructed from library input Medium

This f-string which depends on
library input
is later used in a
shell command
.
This f-string which depends on
library input
is later used in a
shell command
.
This f-string which depends on
library input
is later used in a
shell command
.
This f-string which depends on
library input
is later used in a
shell command
.
This f-string which depends on
library input
is later used in a
shell command
.
This f-string which depends on
library input
is later used in a
shell command
.
os.system(command)


def _check_packmol(PACKMOL): # pragma: no cover
Expand Down

0 comments on commit e3f35a2

Please sign in to comment.