Returns random hex characters. Useful for creating resources with random names.
(num_chars)
| 254 | |
| 255 | |
| 256 | def random_chars(num_chars): |
| 257 | """Returns random hex characters. |
| 258 | |
| 259 | Useful for creating resources with random names. |
| 260 | |
| 261 | """ |
| 262 | return binascii.hexlify(os.urandom(int(num_chars / 2))).decode('ascii') |
| 263 | |
| 264 | |
| 265 | def random_bucket_name(prefix='awscli-s3integ', num_random=15): |
no test coverage detected