diff --git a/scripts/oe-depends-dot b/scripts/oe-depends-dot
index 10e8b1d387..7b16b911bd 100755
--- a/scripts/oe-depends-dot
+++ b/scripts/oe-depends-dot
@@ -17,7 +17,7 @@ class Dot(object):
             description="Analyse task-depends.dot generated by bitbake -g",
             formatter_class=argparse.RawDescriptionHelpFormatter)
         parser.add_argument("dotfile",
-            help = "Specify the dotfile", nargs = 1, action='store', default='')
+            help = "Specify the dotfile", action='store', default='')
         parser.add_argument("-k", "--key",
             help = "Specify the key, e.g., recipe name",
             action="store", default='')
@@ -101,7 +101,7 @@ Reduce the .dot file packages only, no tasks:
         #print(self.args.dotfile[0])
         # The format is {key: depends}
         depends = {}
-        with open(self.args.dotfile[0], 'r') as f:
+        with open(self.args.dotfile, 'r') as f:
             for line in f.readlines():
                 if ' -> ' not in line:
                     continue
@@ -139,7 +139,7 @@ Reduce the .dot file packages only, no tasks:
                         child_deps |= depends[dep]
 
                 reduced_depends[k] = deps - child_deps
-                outfile= '%s-reduced%s' % (self.args.dotfile[0][:-4], self.args.dotfile[0][-4:])
+                outfile= '%s-reduced%s' % (self.args.dotfile[:-4], self.args.dotfile[-4:])
             with open(outfile, 'w') as f:
                 print('Saving reduced dot file to %s' % outfile)
                 f.write('digraph depends {\n')
@@ -150,7 +150,7 @@ Reduce the .dot file packages only, no tasks:
             sys.exit(0)
 
         if self.args.key not in depends:
-            print("ERROR: Can't find key %s in %s" % (self.args.key, self.args.dotfile[0]))
+            print("ERROR: Can't find key %s in %s" % (self.args.key, self.args.dotfile))
             sys.exit(1)
 
         if self.args.depends:
