Skip to content

Commit

Permalink
[intfstat] fix --delete fail when counters dump does not exist (#752)
Browse files Browse the repository at this point in the history
Signed-off-by: Mykola Faryma <[email protected]>
  • Loading branch information
mykolaf authored and abdosi committed Dec 31, 2019
1 parent 4a89485 commit b32368e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/intfstat
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,10 @@ def main():
cnstat_fqn_file = cnstat_dir + "/" + cnstat_file

if delete_all_stats:
# There is nothing to delete
if not os.path.isdir(cnstat_dir):
sys.exit(0)

for file in os.listdir(cnstat_dir):
os.remove(cnstat_dir + "/" + file)

Expand Down

0 comments on commit b32368e

Please sign in to comment.