Mercurial > repos > earlhaminst > export_to_cluster
comparison export_to_cluster.py @ 1:a9d1991c90e3 draft
planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/export_to_cluster/ commit 7d8a044afcc2cdf4fa7a3c360d9df3990356589c-dirty
| author | earlhaminst |
|---|---|
| date | Mon, 03 Oct 2016 06:26:41 -0400 |
| parents | 0dbe46f58158 |
| children | b97775e9fe06 |
comparison
equal
deleted
inserted
replaced
| 0:0dbe46f58158 | 1:a9d1991c90e3 |
|---|---|
| 14 (options, args) = parser.parse_args() | 14 (options, args) = parser.parse_args() |
| 15 if not options.export_dir: | 15 if not options.export_dir: |
| 16 parser.error('Export directory cannot be empty') | 16 parser.error('Export directory cannot be empty') |
| 17 if not options.dir_prefix: | 17 if not options.dir_prefix: |
| 18 parser.error('Directory prefix cannot be empty') | 18 parser.error('Directory prefix cannot be empty') |
| 19 if len(args) < 2: | 19 if len(args) < 3: |
| 20 parser.error('Require at least two arguments') | 20 parser.error('Require at least two arguments') |
| 21 if len(args) % 2 != 0: | 21 if len(args) % 3 != 0: |
| 22 parser.error('Require an even number of arguments') | 22 parser.error('Require an even number of arguments') |
| 23 | 23 |
| 24 real_export_dir = os.path.realpath(options.export_dir) | 24 real_export_dir = os.path.realpath(options.export_dir) |
| 25 dir_prefix = options.dir_prefix.rstrip(os.sep) | 25 dir_prefix = options.dir_prefix.rstrip(os.sep) |
| 26 if not real_export_dir.startswith(dir_prefix): | 26 if not real_export_dir.startswith(dir_prefix): |
