1. Prometheus Research, LLC
  2. Prometheus
  3. htsql

Commits

Kirill Simonov  committed bbaaa48

htsql-ctl shell: ignore non-indented comments.

  • Participants
  • Parent commits 27f42ef
  • Branches default

Comments (0)

Files changed (1)

File src/htsql/ctl/shell.py

View file
             self.ctl.out()
             return True
 
-        # Skip empty lines.
+        # Skip empty lines and comments.
         line = line.strip()
-        if not line:
+        if not line or line.startswith('#'):
             return
 
         return self.execute(line)
             if not line.strip():
                 if lines:
                     lines.append(line)
+            elif line.startswith('#'):
+                if lines:
+                    blocks.append(lines)
+                lines = []
             elif line == line.lstrip():
                 if lines:
                     blocks.append(lines)