ninja-fix CASSANDRA-14056 to correctly handle dtest_print_tests_only
diff --git a/run_dtests.py b/run_dtests.py
index ecda37b..ccd60b9 100755
--- a/run_dtests.py
+++ b/run_dtests.py
@@ -86,22 +86,23 @@
 
         args = parser.parse_args()
 
-        if not args.dtest_print_tests_only and args.cassandra_dir is None:
-            if args.cassandra_version is None:
+        if not args.dtest_print_tests_only:
+            if args.cassandra_dir is None and args.cassandra_version is None:
                 raise Exception("Required dtest arguments were missing! You must provide either --cassandra-dir "
                                 "or --cassandra-version. Refer to the documentation or invoke the help with --help.")
 
+            # Either cassandra_version or cassandra_dir is defined, so figure out the version
+            CASSANDRA_VERSION = args.cassandra_version or get_version_from_build(args.cassandra_dir)
+
+            if args.use_off_heap_memtables and ("3.0" <= CASSANDRA_VERSION < "3.4"):
+                raise Exception("The selected Cassandra version %s doesn't support the provided option "
+                                "--use-off-heap-memtables, see https://issues.apache.org/jira/browse/CASSANDRA-9472 "
+                                "for details" % CASSANDRA_VERSION)
+
         if args.dtest_enable_debug_logging:
             logging.root.setLevel(logging.DEBUG)
             logger.setLevel(logging.DEBUG)
 
-        # Either cassandra_version or cassandra_dir is defined, so figure out the version
-        CASSANDRA_VERSION = args.cassandra_version or get_version_from_build(args.cassandra_dir)
-
-        if args.use_off_heap_memtables and ("3.0" <= CASSANDRA_VERSION < "3.4"):
-            raise Exception("The selected Cassandra version %s doesn't support the provided option "
-                            "--use-off-heap-memtables, see https://issues.apache.org/jira/browse/CASSANDRA-9472 "
-                            "for details" % CASSANDRA_VERSION)
 
         # Get dictionaries corresponding to each point in the configuration matrix
         # we want to run, then generate a config object for each of them.