(self, *, path, cache, fd, mode, user=None, group=None)
| 1381 | return status |
| 1382 | |
| 1383 | def process_pipe(self, *, path, cache, fd, mode, user=None, group=None): |
| 1384 | status = "i" # stdin (or other pipe) |
| 1385 | self.print_file_status(status, path) |
| 1386 | status = None # we already printed the status |
| 1387 | if user is not None: |
| 1388 | uid = user2uid(user) |
| 1389 | if uid is None: |
| 1390 | raise Error("no such user: %s" % user) |
| 1391 | else: |
| 1392 | uid = None |
| 1393 | if group is not None: |
| 1394 | gid = group2gid(group) |
| 1395 | if gid is None: |
| 1396 | raise Error("no such group: %s" % group) |
| 1397 | else: |
| 1398 | gid = None |
| 1399 | t = int(time.time()) * 1000000000 |
| 1400 | item = Item(path=path, mode=mode & 0o107777 | 0o100000, mtime=t, atime=t, ctime=t) # forcing regular file mode |
| 1401 | if user is not None: |
| 1402 | item.user = user |
| 1403 | if group is not None: |
| 1404 | item.group = group |
| 1405 | if uid is not None: |
| 1406 | item.uid = uid |
| 1407 | if gid is not None: |
| 1408 | item.gid = gid |
| 1409 | self.process_file_chunks(item, cache, self.stats, self.show_progress, backup_io_iter(self.chunker.chunkify(fd))) |
| 1410 | item.get_size(memorize=True) |
| 1411 | self.stats.nfiles += 1 |
| 1412 | self.add_item(item, stats=self.stats) |
| 1413 | return status |
| 1414 | |
| 1415 | def process_file(self, *, path, parent_fd, name, st, cache, flags=flags_normal, last_try=False, strip_prefix): |
| 1416 | with self.create_helper(path, st, None, strip_prefix=strip_prefix) as ( |
no test coverage detected